Home
last modified time | relevance | path

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

12

/ohos5.0/commonlibrary/c_utils/base/src/
H A Dunicode_ex.cpp124 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 Dstring_ex.cpp269 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 Dunicode_ex.h19 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 Dedm_utils.cpp49 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 Dstring_ex.h235 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 Dstr_convert.cpp27 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 Dstring_utils.cpp118 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 Dstring_utils.h31 static std::string ToUtf8(const std::u16string &str16);
/ohos5.0/base/location/services/location_gnss/gnss/source/
H A Dstring_utils.cpp120 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 Dtoken_callback_stub.cpp33 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 Dsms_dump_helper.cpp37 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 Dcore_service_dump_helper.cpp53 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 Dstr_convert.h24 std::string ToUtf8(std::u16string str16);
/ohos5.0/base/customization/enterprise_device_management/common/native/include/
H A Dedm_utils.h30 static std::string Utf16ToUtf8(const std::u16string &str16);
/ohos5.0/commonlibrary/ets_utils/js_api_module/buffer/
H A Dconverter.cpp110 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 Dstring_utils.h33 static std::string ToUtf8(const std::u16string &str16);
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/obex/
H A Dobex_utils.h44 static std::string UnicodeToUtf8(const std::u16string &str16);
H A Dobex_utils.cpp263 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 Dutil_helper.cpp233 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 Dshared_block.cpp51 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 Dc-utils-guide-string.md28 | 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 Dprofileutils_fuzzer.cpp289 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 Dnapi_util.h32 static std::string ToUtf8(std::u16string str16);
H A Dnapi_util.cpp109 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 Dshared_block.h326 static std::string ToUtf8(const std::u16string& str16);

12