Namespaces | Enumerations | Functions
include/cinder/Unicode.h File Reference

Go to the source code of this file.

Namespaces

namespace  cinder

Enumerations

enum  cinder::UnicodeBreaks { cinder::UNICODE_MUST_BREAK, cinder::UNICODE_ALLOW_BREAK, cinder::UNICODE_NO_BREAK, cinder::UNICODE_INSIDE_CHAR }
 Values returned by calcBreaksUtf8 and calcBreaksUtf16. More...

Functions

size_t cinder::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 supplying a non-default lengthInBytes of str.
uint32_t cinder::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.
size_t cinder::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.
void cinder::lineBreakUtf8 (const char *line, const std::function< bool(const char *, size_t)> &measureFn, std::function< void(const char *, size_t)> lineProcessFn)
void cinder::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 enumerated by UnicodeBreaks.
void cinder::calcLinebreaksUtf8 (const char *str, size_t strLength, std::vector< uint8_t > *resultBreaks)
 Sets resultBreaks to be of the same length as the UTF-8 string str with the values enumerated by UnicodeBreaks.
void cinder::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 enumerated by UnicodeBreaks.
void cinder::calcLinebreaksUtf16 (const uint16_t *str, size_t strLength, std::vector< uint8_t > *resultBreaks)
 Sets resultBreaks to be of the same length as the UTF-16 string str with the values enumerated by UnicodeBreaks.