/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | unicode_ex.cpp | 124 if (str16 == nullptr || str16Len == 0) { in Utf16ToUtf8Length() 130 while (str16 < str16End) { in Utf16ToUtf8Length() 132 if (((*str16 & 0xFC00) == 0xD800) && ((str16 + 1) < str16End) in Utf16ToUtf8Length() 133 && ((*(str16 + 1) & 0xFC00) == 0xDC00)) { in Utf16ToUtf8Length() 137 str16 += 2; in Utf16ToUtf8Length() 183 int utf8Len = Utf16ToUtf8Length(str16, str16Len); in Char16ToChar8() 201 size_t str16Len = str16.length(); in String16ToString8() 331 char16_t* str16 = nullptr; in Char8ToChar16() local 341 if (str16 == nullptr) { in Char8ToChar16() 347 return str16; in Char8ToChar16() [all …]
|
H A D | string_ex.cpp | 269 string Str16ToStr8(const u16string& str16) in Str16ToStr8() argument 272 if (!String16ToString8(str16, str8Value)) { in Str16ToStr8() 279 int GetUtf16ToUtf8Length(const u16string& str16) in GetUtf16ToUtf8Length() argument 281 size_t str16Len = str16.length(); in GetUtf16ToUtf8Length() 285 const char16_t *utf16Str = str16.c_str(); in GetUtf16ToUtf8Length() 289 int Char16ToChar8(const u16string& str16, char *buffer, int bufferLen) in Char16ToChar8() argument 294 size_t str16Len = str16.length(); in Char16ToChar8() 298 const char16_t *utf16Str = str16.c_str(); in Char16ToChar8()
|
H A D | unicode_ex.h | 19 bool String8ToString16(const std::string& str8, std::u16string& str16); 20 bool String16ToString8(const std::u16string& str16, std::string& str8); 23 int Utf16ToUtf8Length(const char16_t* str16, size_t str16Len);
|
/ohos5.0/base/customization/enterprise_device_management/common/native/src/ |
H A D | edm_utils.cpp | 49 std::string EdmUtils::Utf16ToUtf8(const std::u16string &str16) in Utf16ToUtf8() argument 51 if (str16 == ERROR_USTRING) { in Utf16ToUtf8() 55 std::string result = convert.to_bytes(str16); in Utf16ToUtf8()
|
/ohos5.0/commonlibrary/c_utils/base/include/ |
H A D | string_ex.h | 235 std::string Str16ToStr8(const std::u16string& str16); 253 int GetUtf16ToUtf8Length(const std::u16string& str16); 265 int Char16ToChar8(const std::u16string& str16, char *buffer, int bufferLen);
|
/ohos5.0/base/telephony/core_service/utils/common/src/ |
H A D | str_convert.cpp | 27 std::string ToUtf8(std::u16string str16) in ToUtf8() argument 29 return std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> {}.to_bytes(str16); in ToUtf8()
|
/ohos5.0/base/telephony/sms_mms/utils/ |
H A D | string_utils.cpp | 118 std::string StringUtils::ToUtf8(const std::u16string &str16) in ToUtf8() argument 120 if (str16.empty()) { in ToUtf8() 124 return Str16ToStr8(str16); in ToUtf8()
|
H A D | string_utils.h | 31 static std::string ToUtf8(const std::u16string &str16);
|
/ohos5.0/base/location/services/location_gnss/gnss/source/ |
H A D | string_utils.cpp | 120 std::string StringUtils::ToUtf8(const std::u16string &str16) in ToUtf8() argument 122 if (str16.empty()) { in ToUtf8() 126 return Str16ToStr8(str16); in ToUtf8()
|
/ohos5.0/base/security/access_token/interfaces/innerkits/token_callback/src/ |
H A D | token_callback_stub.cpp | 33 static std::string to_utf8(std::u16string str16) in to_utf8() argument 35 return std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> {}.to_bytes(str16); in to_utf8()
|
/ohos5.0/base/telephony/sms_mms/services/sms/ |
H A D | sms_dump_helper.cpp | 37 static std::string to_utf8(std::u16string str16) in to_utf8() argument 39 return std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> {}.to_bytes(str16); in to_utf8()
|
/ohos5.0/base/telephony/core_service/services/core/src/ |
H A D | core_service_dump_helper.cpp | 53 static std::string to_utf8(std::u16string str16) in to_utf8() argument 55 return std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> {}.to_bytes(str16); in to_utf8()
|
/ohos5.0/base/telephony/core_service/utils/common/include/ |
H A D | str_convert.h | 24 std::string ToUtf8(std::u16string str16);
|
/ohos5.0/base/customization/enterprise_device_management/common/native/include/ |
H A D | edm_utils.h | 30 static std::string Utf16ToUtf8(const std::u16string &str16);
|
/ohos5.0/commonlibrary/ets_utils/js_api_module/buffer/ |
H A D | converter.cpp | 110 u16string str16 = u""; in Utf16BEToLE() local 117 str16.push_back(c16); in Utf16BEToLE() 119 return str16; in Utf16BEToLE()
|
/ohos5.0/base/location/services/location_gnss/gnss/include/ |
H A D | string_utils.h | 33 static std::string ToUtf8(const std::u16string &str16);
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/obex/ |
H A D | obex_utils.h | 44 static std::string UnicodeToUtf8(const std::u16string &str16);
|
H A D | obex_utils.cpp | 263 std::string ObexUtils::UnicodeToUtf8(const std::u16string &str16) in UnicodeToUtf8() argument 266 return convert.to_bytes(str16); in UnicodeToUtf8()
|
/ohos5.0/commonlibrary/ets_utils/platform/ohos/ |
H A D | util_helper.cpp | 233 std::u16string str16 = u""; in Utf16BEToLE() local 240 str16.push_back(c16); in Utf16BEToLE() 242 return str16; in Utf16BEToLE()
|
/ohos5.0/foundation/distributeddatamgr/data_share/frameworks/native/common/src/ |
H A D | shared_block.cpp | 51 std::string SharedBlock::ToUtf8(const std::u16string& str16) in ToUtf8() argument 53 return OHOS::Str16ToStr8(str16); in ToUtf8()
|
/ohos5.0/commonlibrary/c_utils/docs/zh-cn/ |
H A D | c-utils-guide-string.md | 28 | std::string | **Str16ToStr8**(const std::u16string& str16)<br>将UTF-16编码的`std::u16string`字符串对象转换为U…
|
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/test/fuzztest/profileutils_fuzzer/ |
H A D | profileutils_fuzzer.cpp | 289 std::u16string str16 = u"abc"; in ToStringFuzzTest() local 290 ProfileUtils::toString(str16); in ToStringFuzzTest()
|
/ohos5.0/base/telephony/core_service/frameworks/js/napi/ |
H A D | napi_util.h | 32 static std::string ToUtf8(std::u16string str16);
|
H A D | napi_util.cpp | 109 std::string NapiUtil::ToUtf8(std::u16string str16) in ToUtf8() argument 111 if (str16 == ERROR_USTRING) { in ToUtf8() 115 std::string result = convert.to_bytes(str16); in ToUtf8()
|
/ohos5.0/foundation/distributeddatamgr/data_share/frameworks/native/common/include/ |
H A D | shared_block.h | 326 static std::string ToUtf8(const std::u16string& str16);
|