Searched refs:utf8_length (Results 1 – 9 of 9) sorted by relevance
/aosp12/frameworks/base/libs/androidfw/ |
H A D | Util.cpp | 60 ssize_t utf8_length = utf16_to_utf8_length(utf16.data(), utf16.length()); in Utf16ToUtf8() local 61 if (utf8_length <= 0) { in Utf16ToUtf8() 66 utf8.resize(utf8_length); in Utf16ToUtf8() 67 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); in Utf16ToUtf8()
|
/aosp12/art/runtime/native/ |
H A D | libcore_util_CharsetUtils.cc | 165 size_t utf8_length = 0; in CharsetUtils_toUtf8Bytes() local 167 utf8_length = length; in CharsetUtils_toUtf8Bytes() 169 visit_chars16([&utf8_length](jbyte c ATTRIBUTE_UNUSED) { ++utf8_length; }); in CharsetUtils_toUtf8Bytes() 172 mirror::ByteArray::Alloc(soa.Self(), dchecked_integral_cast<int32_t>(utf8_length)); in CharsetUtils_toUtf8Bytes()
|
/aosp12/frameworks/base/tools/aapt2/util/ |
H A D | Util.cpp | 414 const size_t utf8_length = (size_t) utf32_to_utf8_length(&codepoint, 1); in ModifiedUtf8ToUtf8() local 415 if (utf8_length != 4) { in ModifiedUtf8ToUtf8() 421 output.resize(output.size() + utf8_length); in ModifiedUtf8ToUtf8() 422 utf32_to_utf8((char32_t*) &codepoint, 1, start, utf8_length + 1); in ModifiedUtf8ToUtf8() 453 ssize_t utf8_length = utf16_to_utf8_length(utf16.data(), utf16.length()); in Utf16ToUtf8() local 454 if (utf8_length <= 0) { in Utf16ToUtf8() 459 utf8.resize(utf8_length); in Utf16ToUtf8() 460 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); in Utf16ToUtf8()
|
/aosp12/packages/modules/adb/client/ |
H A D | fastdeploy.cpp | 141 ssize_t utf8_length = utf16_to_utf8_length(input, input_len); in get_string_from_utf16() local 142 if (utf8_length <= 0) { in get_string_from_utf16() 146 utf8.resize(utf8_length); in get_string_from_utf16() 147 utf16_to_utf8(input, input_len, &*utf8.begin(), utf8_length + 1); in get_string_from_utf16()
|
/aosp12/art/runtime/mirror/ |
H A D | string.cc | 195 int32_t utf8_length) { in AllocFromModifiedUtf8() argument 197 const bool compressible = kUseStringCompression && (utf16_length == utf8_length); in AllocFromModifiedUtf8() 208 ConvertModifiedUtf8ToUtf16(utf16_data_out, utf16_length, utf8_data_in, utf8_length); in AllocFromModifiedUtf8()
|
H A D | string.h | 167 int32_t utf8_length)
|
/aosp12/art/libdexfile/dex/ |
H A D | dex_file-inl.h | 36 size_t utf8_length = LIKELY(utf8_data[utf16_length] == 0) // Is ASCII? in StringViewFromUtf16Length() local 39 return std::string_view(utf8_data, utf8_length); in StringViewFromUtf16Length()
|
/aosp12/art/runtime/jni/ |
H A D | jni_internal.cc | 1918 size_t utf8_length = strlen(utf); in NewStringUTF() local 1919 if (UNLIKELY(utf8_length > static_cast<uint32_t>(std::numeric_limits<int32_t>::max()))) { in NewStringUTF() 1924 android::base::StringPrintf("NewStringUTF input is 2 GiB or more: %zu", utf8_length); in NewStringUTF() 1932 utf8_length, in NewStringUTF() 1935 if (UNLIKELY(utf8_length != 0u && utf16_length == 0u)) { in NewStringUTF() 1949 replacement_utf->reserve(utf8_length); in NewStringUTF() 1952 utf8_length, in NewStringUTF() 1961 utf8_length = replacement_utf->length(); in NewStringUTF() 1963 DCHECK_LE(utf16_length, utf8_length); in NewStringUTF() 1964 DCHECK_LE(utf8_length, static_cast<uint32_t>(std::numeric_limits<int32_t>::max())); in NewStringUTF() [all …]
|
/aosp12/frameworks/base/tools/aapt2/ |
H A D | ResourceUtils.cpp | 937 const size_t utf8_length = xml_string_.text.size(); in AppendText() local 938 ssize_t len = utf8_to_utf16_length(utf8_data + previous_len, utf8_length - previous_len); in AppendText()
|