#include <kanzi/core.ui/text/text_break_iterator.hpp>
◆ Type
Type of text break iterator.
Enumerator |
---|
Word | Iterate word boundaries.
|
Line | Iterate line breaks.
|
◆ TextBreakIterator() [1/3]
kanzi::TextBreakIterator::TextBreakIterator |
( |
Type | type, |
|
|
const char * | utf8String, |
|
|
int64_t | utf8Length ) |
|
explicit |
Constructs a text break iterator for a UTF-8 string.
Indexes returned by TextBreakIterator refer to the elements in the original character array.
- Parameters
-
type | Type of the text break iterator. |
utf8String | String in UTF-8 format. |
utf8Length | A length of the given string. If the string is 0-terminated, -1. |
◆ TextBreakIterator() [2/3]
Constructs a text break iterator for a UTF-16 string.
Indexes returned by TextBreakIterator refer to the elements in the original character array.
- Parameters
-
type | Type of the text break iterator. |
utf16String | String in UTF-16 format. |
utf16Length | A length of the given string. If the string is 0-terminated, -1. |
◆ TextBreakIterator() [3/3]
◆ ~TextBreakIterator()
kanzi::TextBreakIterator::~TextBreakIterator |
( |
| ) |
|
◆ operator=()
◆ first()
size_t kanzi::TextBreakIterator::first |
( |
| ) |
|
Sets the iterator position to the beginning of the string.
- Returns
- New iterator position (zero).
◆ last()
size_t kanzi::TextBreakIterator::last |
( |
| ) |
|
Sets the iterator position to after the last character of the string.
- Returns
- New iterator position.
◆ next()
size_t kanzi::TextBreakIterator::next |
( |
| ) |
|
Advance the iterator to the next boundary.
- Returns
- New iterator position. If all boundaries have already been returned, returns s_done.
◆ previous()
size_t kanzi::TextBreakIterator::previous |
( |
| ) |
|
Advance the iterator to the previous boundary.
- Returns
- New iterator position. If all boundaries have already been returned, returns s_done.
◆ current()
size_t kanzi::TextBreakIterator::current |
( |
| ) |
const |
Returns the current position of the iterator.
- Returns
- Current position of the iterator.
◆ preceding()
size_t kanzi::TextBreakIterator::preceding |
( |
size_t | offset | ) |
|
Sets the iterator to the first boundary that precedes the given offset.
- Parameters
-
offset | A character offset in the original character array. |
- Returns
- New iterator position. If all boundaries have already been returned, returns s_done.
◆ following()
size_t kanzi::TextBreakIterator::following |
( |
size_t | offset | ) |
|
Sets the iterator to the first boundary that follows the given offset.
- Parameters
-
offset | A character offset in the original character array. |
- Returns
- New iterator position. If all boundaries have already been returned, returns s_done.
◆ char32At()
char32_t kanzi::TextBreakIterator::char32At |
( |
size_t | offset | ) |
const |
Returns the UTF-32 Unicode codepoint at the given offset.
- Parameters
-
offset | A character offset in the original character array. |
- Returns
- UTF-32 Unicode codepoint at the given offset.
◆ s_done
Value indicating that all boundaries have been returned.
The documentation for this class was generated from the following file: