|
cocos2d-x
3.3
|
Functions | |
| CC_DLL bool | UTF8ToUTF16 (const std::string &utf8, std::u16string &outUtf16) |
| Converts utf8 string to utf16 string. More... | |
| CC_DLL bool | UTF16ToUTF8 (const std::u16string &utf16, std::string &outUtf8) |
| Converts utf16 string to utf8 string. More... | |
| CC_DLL void | trimUTF16Vector (std::vector< char16_t > &str) |
| Trims the unicode spaces at the end of char16_t vector. More... | |
| CC_DLL bool | isUnicodeSpace (char16_t ch) |
| Whether the character is a whitespace character. More... | |
| CC_DLL bool | isCJKUnicode (char16_t ch) |
| Whether the character is a Chinese/Japanese/Korean character. More... | |
| CC_DLL long | getCharacterCountInUTF8String (const std::string &utf8) |
| Returns the length of the string in characters. More... | |
| CC_DLL unsigned int | getIndexOfLastNotChar16 (const std::vector< char16_t > &str, char16_t c) |
| Gets the index of the last character that is not equal to the character given. More... | |
| CC_DLL std::vector< char16_t > | getChar16VectorFromUTF16String (const std::u16string &utf16) |
| Gets char16_t vector from a given utf16 string. More... | |
| template<typename T > | |
| std::string | toString (T arg) |
| std::string CC_DLL | format (const char *format,...) CC_FORMAT_PRINTF(1 |
| std::string CC_DLL cocos2d::StringUtils::format | ( | const char * | format, |
| ... | |||
| ) |
| CC_DLL std::vector<char16_t> cocos2d::StringUtils::getChar16VectorFromUTF16String | ( | const std::u16string & | utf16 | ) |
Gets char16_t vector from a given utf16 string.
| CC_DLL long cocos2d::StringUtils::getCharacterCountInUTF8String | ( | const std::string & | utf8 | ) |
Returns the length of the string in characters.
| utf8 | an UTF-8 encoded string. |
| CC_DLL unsigned int cocos2d::StringUtils::getIndexOfLastNotChar16 | ( | const std::vector< char16_t > & | str, |
| char16_t | c | ||
| ) |
Gets the index of the last character that is not equal to the character given.
| str | the string to be searched. |
| c | the character to be searched for. |
c. | CC_DLL bool cocos2d::StringUtils::isCJKUnicode | ( | char16_t | ch | ) |
Whether the character is a Chinese/Japanese/Korean character.
| ch | the unicode character |
| CC_DLL bool cocos2d::StringUtils::isUnicodeSpace | ( | char16_t | ch | ) |
Whether the character is a whitespace character.
| ch | the unicode character |
| std::string cocos2d::StringUtils::toString | ( | T | arg | ) |
| CC_DLL void cocos2d::StringUtils::trimUTF16Vector | ( | std::vector< char16_t > & | str | ) |
Trims the unicode spaces at the end of char16_t vector.
| CC_DLL bool cocos2d::StringUtils::UTF16ToUTF8 | ( | const std::u16string & | utf16, |
| std::string & | outUtf8 | ||
| ) |
Converts utf16 string to utf8 string.
| utf16 | The utf16 string to be converted |
| outUtf8 | The output utf8 string |
outUtf8 e.g. | CC_DLL bool cocos2d::StringUtils::UTF8ToUTF16 | ( | const std::string & | utf8, |
| std::u16string & | outUtf16 | ||
| ) |
Converts utf8 string to utf16 string.
| utf8 | The utf8 string to be converted |
| outUtf16 | The output utf16 string |
outUtf16 e.g.