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