Home
last modified time | relevance | path

Searched refs:str16 (Results 1 – 8 of 8) sorted by relevance

/commonlibrary/c_utils/base/src/
Dunicode_ex.cpp104 int Utf16ToUtf8Length(const char16_t* str16, size_t str16Len) in Utf16ToUtf8Length() argument
106 if (str16 == nullptr || str16Len == 0) { in Utf16ToUtf8Length()
110 const char16_t* const str16End = str16 + str16Len; in Utf16ToUtf8Length()
112 while (str16 < str16End) { in Utf16ToUtf8Length()
114 if (((*str16 & 0xFC00) == 0xD800) && ((str16 + 1) < str16End) in Utf16ToUtf8Length()
115 && ((*(str16 + 1) & 0xFC00) == 0xDC00)) { in Utf16ToUtf8Length()
118 str16 += 2; in Utf16ToUtf8Length()
120 charLen = Utf32CodePointUtf8Length(static_cast<char32_t>(*str16++)); in Utf16ToUtf8Length()
161 char* Char16ToChar8(const char16_t* str16, size_t str16Len) in Char16ToChar8() argument
164 int utf8Len = Utf16ToUtf8Length(str16, str16Len); in Char16ToChar8()
[all …]
Dunicode_ex.h19 bool String8ToString16(const std::string& str8, std::u16string& str16);
20 bool String16ToString8(const std::u16string& str16, std::string& str8);
Dstring_ex.cpp265 string Str16ToStr8(const u16string& str16) in Str16ToStr8() argument
268 if (!String16ToString8(str16, str8Value)) { in Str16ToStr8()
/commonlibrary/ets_utils/js_api_module/buffer/
Dconverter.cpp107 u16string str16 = u""; in Utf16BEToLE() local
114 str16.push_back(c16); in Utf16BEToLE()
116 return str16; in Utf16BEToLE()
/commonlibrary/c_utils/base/include/
Dstring_ex.h235 std::string Str16ToStr8(const std::u16string& str16);
/commonlibrary/c_utils/docs/zh-cn/
Dc-utils-guide-string.md28 | std::string | **Str16ToStr8**(const std::u16string& str16)<br>将UTF-16编码的`std::u16string`字符串对象转换为U…
/commonlibrary/c_utils/base/test/unittest/common/
Dutils_string_test.cpp489 u16string str16 = Str8ToStr16(strValue); variable
490 EXPECT_EQ(0, strValue.compare(Str16ToStr8(str16)));
/commonlibrary/ets_utils/js_api_module/buffer/test/
Dtest_napi.cpp1206 std::u16string str16 = OHOS::buffer::Utf8ToUtf16BE(str8, &isOk); variable
1210 ASSERT_EQ(results[i], str16[i]);