Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Enumerations | Functions
Unicode.h File Reference
#include "cinder/Cinder.h"
#include "cinder/Function.h"
#include <string>
Include dependency graph for Unicode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 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

std::u16string cinder::toUtf16 (const char *utf8Str, size_t lengthInBytes=0)
 
std::u16string cinder::toUtf16 (const std::string &utf8Str)
 
std::u32string cinder::toUtf32 (const char *utf8Str, size_t lengthInBytes=0)
 
std::u32string cinder::toUtf32 (const std::string &utf8Str)
 
std::string cinder::toUtf8 (const char16_t *utf16Str, size_t lengthInBytes=0)
 
std::string cinder::toUtf8 (const std::u16string &utf16Str)
 
std::string cinder::toUtf8 (const char32_t *utf32str, size_t lengthInBytes=0)
 
std::string cinder::toUtf8 (const std::u32string &utf32Str)
 
std::u16string cinder::toUtf16 (const std::u32string &utf32str)
 
std::u32string cinder::toUtf32 (const std::u16string &utf16str)
 
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. More...
 
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. More...
 
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. More...
 
void cinder::lineBreakUtf8 (const char *str, const std::function< bool(const char *, size_t)> &measureFn, const 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. More...
 
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. More...
 
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. More...
 
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. More...