#include <libwoopsigfx/include/stringiterator.h>
List of all members.
Detailed Description
Class used to efficiently iterate over the characters in a WoopsiString object. The WoopsiString is a Unicode string that uses the variable-width UTF-8 encoding to represent its characters. This means that it is not possible to iterate over a WoopsiString in the same way that you would iterate over a char array.
Constructor & Destructor Documentation
StringIterator::StringIterator |
( |
const WoopsiString * |
string | ) |
|
Constructor. Moves the iterator to the first character in the string.
- Parameters:
-
string | Pointer to the string that will be iterated over. |
WoopsiGfx::StringIterator::~StringIterator |
( |
| ) |
[inline] |
Member Function Documentation
u32 StringIterator::getCodePoint |
( |
| ) |
const |
Get the codepoint in the string at the iterator's current point.
- Returns:
- The current character in the string.
u8 StringIterator::getCodePointSize |
( |
| ) |
[protected] |
Get the size of the current codepoint in bytes.
- Returns:
- The size of the current codepoint.
s32 WoopsiGfx::StringIterator::getIndex |
( |
| ) |
const [inline] |
Get the current position of the iterator within the string.
- Returns:
- The current character index of the iterator.
u32 StringIterator::getInteger |
( |
u32 * |
charCount = NULL | ) |
|
Get the integer value represented by the sequence of digits at the current point.
- Parameters:
-
charCount | If set to anything other than NULL, the pointer will be populated with the number of characters in the integer. A value of 0 indicates that no digits were found at the current point. |
- Returns:
- The integer value represented by the current string position.
void StringIterator::iterateBackwardsTo |
( |
s32 |
index | ) |
[protected] |
Move backwards from the current index to the specified index.
- Parameters:
-
index | The index to move to. |
void StringIterator::iterateForwardsTo |
( |
s32 |
index | ) |
[protected] |
Move forwards from the current index to the specified index.
- Parameters:
-
index | The index to move to. |
bool StringIterator::moveTo |
( |
s32 |
index | ) |
|
Move the iterator to the specified index.
- Parameters:
-
index | The index to move to. |
- Returns:
- True if the iterator moved; false if not (indicates end of string).
void StringIterator::moveToFirst |
( |
| ) |
|
Moves the iterator to the first character in the string.
void StringIterator::moveToLast |
( |
| ) |
|
Moves the iterator to the last character in the string.
bool StringIterator::moveToNext |
( |
| ) |
|
Move the iterator to the next character in the string.
- Returns:
- True if the iterator moved; false if not (indicates end of string).
bool StringIterator::moveToPrevious |
( |
| ) |
|
Move the iterator to the previous character in the string.
- Returns:
- True if the iterator moved; false if not (indicates start of string).
The documentation for this class was generated from the following files: