UTF8 reader helper functions. More...
#include <utf8_reader.h>
Public Member Functions | |
UTF8_Reader (const std::string::value_type *text, std::string::size_type length) | |
Important: text is not copied by this class and must remain valid during its usage. More... | |
std::string::size_type | char_length () |
Returns the length of the current character. More... | |
unsigned int | character () |
Get the character at the current position. More... | |
bool | is_end () |
Returns true if the current position is at the end of the string. More... | |
void | move_to_leadbyte () |
Moves position to the lead byte of the character. More... | |
void | next () |
Moves position to the next character. More... | |
std::string::size_type | position () |
Get the current position of the reader. More... | |
void | prev () |
Moves position to the previous character. More... | |
void | set_position (std::string::size_type position) |
Set the current position of the reader. More... | |
UTF8 reader helper functions.
uicore::UTF8_Reader::UTF8_Reader | ( | const std::string::value_type * | text, |
std::string::size_type | length | ||
) |
Important: text is not copied by this class and must remain valid during its usage.
std::string::size_type uicore::UTF8_Reader::char_length | ( | ) |
Returns the length of the current character.
unsigned int uicore::UTF8_Reader::character | ( | ) |
Get the character at the current position.
bool uicore::UTF8_Reader::is_end | ( | ) |
Returns true if the current position is at the end of the string.
void uicore::UTF8_Reader::move_to_leadbyte | ( | ) |
Moves position to the lead byte of the character.
void uicore::UTF8_Reader::next | ( | ) |
Moves position to the next character.
std::string::size_type uicore::UTF8_Reader::position | ( | ) |
Get the current position of the reader.
void uicore::UTF8_Reader::prev | ( | ) |
Moves position to the previous character.
void uicore::UTF8_Reader::set_position | ( | std::string::size_type | position | ) |
Set the current position of the reader.