|
NXWidgets
1.19
|
#include <cstringiterator.hxx>
Public Member Functions | |
| CStringIterator (FAR const CNxString *string) | |
| ~CStringIterator (void) | |
| bool | moveToFirst (void) |
| bool | moveToLast (void) |
| bool | moveToNext (void) |
| bool | moveToPrevious (void) |
| bool | moveTo (int index) |
| int | getIndex (void) const |
| nxwidget_char_t | getChar (void) const |
Private Attributes | |
| const CNxString * | m_pString |
| const nxwidget_char_t * | m_pCurrentChar |
| int | m_currentIndex |
Class used to efficiently iterate over the characters in a CNxString object. The CNxString is a Unicode string that uses the fixed-width 16-bit encoding to represent its characters.
Definition at line 102 of file cstringiterator.hxx.
| CStringIterator::CStringIterator | ( | FAR const CNxString * | string | ) |
Constructor. Moves the iterator to the first character in the string.
| string | Pointer to the string that will be iterated over. |
Definition at line 98 of file cstringiterator.cxx.
|
inline |
Destructor.
Definition at line 123 of file cstringiterator.hxx.
|
inline |
Get the letter in the string at the iterator's current point.
Definition at line 183 of file cstringiterator.hxx.
|
inline |
Get the current position of the iterator within the string.
Definition at line 172 of file cstringiterator.hxx.
| bool CStringIterator::moveTo | ( | int | index | ) |
Move the iterator to the specified index.
| index | The index to move to. |
Definition at line 185 of file cstringiterator.cxx.
| bool CStringIterator::moveToFirst | ( | void | ) |
Moves the iterator to the first character in the string.
| Returns | false if the string is empty |
Definition at line 111 of file cstringiterator.cxx.
| bool CStringIterator::moveToLast | ( | void | ) |
Moves the iterator to the last character in the string.
| Returns | false if the string is empty |
Definition at line 130 of file cstringiterator.cxx.
| bool CStringIterator::moveToNext | ( | void | ) |
Move the iterator to the next character in the string.
Definition at line 149 of file cstringiterator.cxx.
| bool CStringIterator::moveToPrevious | ( | void | ) |
Move the iterator to the previous character in the string.
Definition at line 167 of file cstringiterator.cxx.
|
private |
Iterator's current index within the string.
Definition at line 107 of file cstringiterator.hxx.
|
private |
Pointer to the current position of the iterator.
Definition at line 106 of file cstringiterator.hxx.
|
private |
String being iterated over.
Definition at line 105 of file cstringiterator.hxx.
1.8.13