clan::UTF8_Reader Class Reference - ClanLib SDK
Description: clan::UTF8_Reader Class Reference

Public Member Functions | List of all members
clan::UTF8_Reader Class Reference
clanCore Text

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.
unsigned int | get_char ()
| Get the character at the current position.
std::string::size_type | get_char_length ()
| Returns the length of the current character.
std::string::size_type | get_position ()
| Get the current position of the reader.
bool | is_end ()
| Returns true if the current position is at the end of the string.
void | move_to_leadbyte ()
| Moves position to the lead byte of the character.
void | next ()
| Moves position to the next character.
void | prev ()
| Moves position to the previous character.
void | set_position (std::string::size_type position)
| Set the current position of the reader.

## Detailed Description

UTF8 reader helper functions.

## Constructor & Destructor Documentation

## ◆ UTF8_Reader()

clan::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.

## Member Function Documentation

## ◆ get_char()

unsigned int clan::UTF8_Reader::get_char | ( |  | ) |

Get the character at the current position.

## ◆ get_char_length()

std::string::size_type clan::UTF8_Reader::get_char_length | ( |  | ) |

Returns the length of the current character.

## ◆ get_position()

std::string::size_type clan::UTF8_Reader::get_position | ( |  | ) |

Get the current position of the reader.

## ◆ is_end()

bool clan::UTF8_Reader::is_end | ( |  | ) |

Returns true if the current position is at the end of the string.

## ◆ move_to_leadbyte()

void clan::UTF8_Reader::move_to_leadbyte | ( |  | ) |

Moves position to the lead byte of the character.

## ◆ next()

void clan::UTF8_Reader::next | ( |  | ) |

Moves position to the next character.

## ◆ prev()

void clan::UTF8_Reader::prev | ( |  | ) |

Moves position to the previous character.

## ◆ set_position()

void clan::UTF8_Reader::set_position | ( | std::string::size_type | position | ) |

Set the current position of the reader.

The documentation for this class was generated from the following file:

- utf8_reader.h