34 std::u16string
toUtf16(
const char *utf8Str,
size_t lengthInBytes = 0 );
36 std::u32string
toUtf32(
const char *utf8Str,
size_t lengthInBytes = 0 );
45 std::u16string
toUtf16(
const std::u32string &utf32str );
46 std::u32string
toUtf32(
const std::u16string &utf16str );
51 uint32_t
nextCharUtf8(
const char *str,
size_t *inOutByte,
size_t lengthInBytes = 0 );
53 size_t advanceCharUtf8(
const char *str,
size_t numChars,
size_t lengthInBytes = 0 );
55 void lineBreakUtf8(
const char *str,
const std::function<
bool(
const char *,
size_t)> &measureFn,
const std::function<
void(
const char *,
size_t)> &lineProcessFn );
64 void calcLinebreaksUtf8(
const char *str,
size_t strLength, std::vector<uint8_t> *resultBreaks );
70 void calcLinebreaksUtf16(
const uint16_t *str,
size_t strLength, std::vector<uint8_t> *resultBreaks );
GLsizei const GLchar ** string
Definition: GLee.h:2427
size_t stringLengthUtf8(const char *str, size_t lengthInBytes=0)
Returns the number of characters (not bytes) in the the UTF-8 string str. Optimize operation by suppl...
Definition: Unicode.cpp:149
void lineBreakUtf8(const char *str, const std::function< bool(const char *, size_t)> &measureFn, const std::function< void(const char *, size_t)> &lineProcessFn)
Definition: Unicode.cpp:237
std::u16string toUtf16(const char *utf8Str, size_t lengthInBytes=0)
Definition: Unicode.cpp:75
size_t advanceCharUtf8(const char *str, size_t numChars, size_t lengthInBytes=0)
Returns the index in bytes of the next character in str, advanced by numChars characters. Optimize operation by supplying a non-default lengthInBytes of str.
Definition: Unicode.cpp:167
std::u32string toUtf32(const char *utf8Str, size_t lengthInBytes=0)
Definition: Unicode.cpp:92
void calcLinebreaksUtf16(const uint16_t *str, std::vector< uint8_t > *resultBreaks)
Sets resultBreaks to be of the same length as the null-terminated UTF-16 string str with the values e...
Definition: Unicode.cpp:318
uint32_t nextCharUtf8(const char *str, size_t *inOutByte, size_t lengthInBytes=0)
Returns the UTF-32 code point of the next character in str, relative to the byte inOutByte. Increments inOutByte to be the first byte of the next character. Optimize operation by supplying a non-default lengthInBytes of str.
Definition: Unicode.cpp:160
UnicodeBreaks
Values returned by calcBreaksUtf8 and calcBreaksUtf16.
Definition: Unicode.h:58
void calcLinebreaksUtf8(const char *str, std::vector< uint8_t > *resultBreaks)
Sets resultBreaks to be of the same length as the null-terminated UTF-8 string str with the values en...
Definition: Unicode.cpp:305
std::string toUtf8(const char16_t *utf16Str, size_t lengthInBytes=0)
Definition: Unicode.cpp:109