/external/libchrome/base/strings/ |
D | utf_string_conversion_utils.h | 19 inline bool IsValidCodepoint(uint32_t code_point) { in IsValidCodepoint() argument 23 return code_point < 0xD800u || in IsValidCodepoint() 24 (code_point >= 0xE000u && code_point <= 0x10FFFFu); in IsValidCodepoint() 27 inline bool IsValidCharacter(uint32_t code_point) { in IsValidCharacter() argument 30 return code_point < 0xD800u || (code_point >= 0xE000u && in IsValidCharacter() 31 code_point < 0xFDD0u) || (code_point > 0xFDEFu && in IsValidCharacter() 32 code_point <= 0x10FFFFu && (code_point & 0xFFFEu) != 0xFFFEu); in IsValidCharacter() 53 uint32_t* code_point); 60 uint32_t* code_point); 67 BASE_EXPORT size_t WriteUnicodeCharacter(uint32_t code_point, [all …]
|
D | utf_string_conversion_utils.cc | 21 int32_t code_point; in ReadUnicodeCharacter() local 22 CBU8_NEXT(src, *char_index, src_len, code_point); in ReadUnicodeCharacter() 23 *code_point_out = static_cast<uint32_t>(code_point); in ReadUnicodeCharacter() 30 return IsValidCodepoint(code_point); in ReadUnicodeCharacter() 36 uint32_t* code_point) { in ReadUnicodeCharacter() argument 46 *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], in ReadUnicodeCharacter() 51 *code_point = src[*char_index]; in ReadUnicodeCharacter() 54 return IsValidCodepoint(*code_point); in ReadUnicodeCharacter() 61 uint32_t* code_point) { in ReadUnicodeCharacter() argument 63 *code_point = src[*char_index]; in ReadUnicodeCharacter() [all …]
|
D | utf_string_conversions.cc | 62 void UnicodeAppendUnsafe(char* out, int32_t* size, uint32_t code_point) { in UnicodeAppendUnsafe() argument 63 CBU8_APPEND_UNSAFE(out, *size, code_point); in UnicodeAppendUnsafe() 66 void UnicodeAppendUnsafe(char16* out, int32_t* size, uint32_t code_point) { in UnicodeAppendUnsafe() argument 67 CBU16_APPEND_UNSAFE(out, *size, code_point); in UnicodeAppendUnsafe() 72 void UnicodeAppendUnsafe(wchar_t* out, int32_t* size, uint32_t code_point) { in UnicodeAppendUnsafe() argument 73 out[(*size)++] = code_point; in UnicodeAppendUnsafe() 90 int32_t code_point; in DoUTFConversion() local 91 CBU8_NEXT(src, i, src_len, code_point); in DoUTFConversion() 93 if (!IsValidCodepoint(code_point)) { in DoUTFConversion() 95 code_point = kErrorCodePoint; in DoUTFConversion() [all …]
|
D | utf_offset_string_conversions.cc | 199 uint32_t code_point; in ConvertUnicode() local 202 if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) { in ConvertUnicode() 203 chars_written = WriteUnicodeCharacter(code_point, output); in ConvertUnicode()
|
D | old_utf_string_conversions.cc | 67 uint32_t code_point; in ConvertUnicode() local 68 if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) { in ConvertUnicode() 69 WriteUnicodeCharacter(code_point, output); in ConvertUnicode()
|
D | string_util.cc | 373 base_icu::UChar32 code_point = 0; in TruncateUTF8ToByteSize() local 374 CBU8_NEXT(data, char_index, truncation_length, code_point); in TruncateUTF8ToByteSize() 375 if (!IsValidCharacter(code_point) || in TruncateUTF8ToByteSize() 376 !IsValidCodepoint(code_point)) { in TruncateUTF8ToByteSize() 520 int32_t code_point; in IsStringUTF8() local 521 CBU8_NEXT(src, char_index, src_len, code_point); in IsStringUTF8() 522 if (!IsValidCharacter(code_point)) in IsStringUTF8()
|
/external/libchrome/base/json/ |
D | string_escape.cc | 35 bool EscapeSpecialCodePoint(uint32_t code_point, std::string* dest) { in EscapeSpecialCodePoint() argument 39 switch (code_point) { in EscapeSpecialCodePoint() 93 uint32_t code_point; in EscapeJSONStringImpl() local 94 if (!ReadUnicodeCharacter(str.data(), length, &i, &code_point) || in EscapeJSONStringImpl() 95 code_point == static_cast<decltype(code_point)>(CBU_SENTINEL) || in EscapeJSONStringImpl() 96 !IsValidCharacter(code_point)) { in EscapeJSONStringImpl() 97 code_point = kReplacementCodePoint; in EscapeJSONStringImpl() 101 if (EscapeSpecialCodePoint(code_point, dest)) in EscapeJSONStringImpl() 105 if (code_point < 32) in EscapeJSONStringImpl() 106 base::StringAppendF(dest, kU16EscapeFormat, code_point); in EscapeJSONStringImpl() [all …]
|
D | json_parser.cc | 515 uint32_t code_point; in ConsumeStringRaw() local 516 if (!DecodeUTF16(&code_point)) { in ConsumeStringRaw() 520 string.Append(code_point); in ConsumeStringRaw() 597 uint32_t code_point = in DecodeUTF16() local 599 if (!IsValidCharacter(code_point)) in DecodeUTF16() 602 *out_code_point = code_point; in DecodeUTF16()
|
/external/protobuf/src/google/protobuf/io/ |
D | tokenizer.cc | 929 static void AppendUTF8(uint32 code_point, std::string* output) { in AppendUTF8() argument 932 if (code_point <= 0x7f) { in AppendUTF8() 933 tmp = code_point; in AppendUTF8() 935 } else if (code_point <= 0x07ff) { in AppendUTF8() 936 tmp = 0x0000c080 | ((code_point & 0x07c0) << 2) | (code_point & 0x003f); in AppendUTF8() 938 } else if (code_point <= 0xffff) { in AppendUTF8() 939 tmp = 0x00e08080 | ((code_point & 0xf000) << 4) | in AppendUTF8() 940 ((code_point & 0x0fc0) << 2) | (code_point & 0x003f); in AppendUTF8() 942 } else if (code_point <= 0x1fffff) { in AppendUTF8() 943 tmp = 0xf0808080 | ((code_point & 0x1c0000) << 6) | in AppendUTF8() [all …]
|
/external/vboot_reference/cgpt/ |
D | cgpt_common.c | 443 uint32_t code_point = 0; in UTF16ToUTF8() local 461 code_point = (codeunit & 0x03FF) + 0x0040; in UTF16ToUTF8() 464 code_point = codeunit; in UTF16ToUTF8() 469 code_point = (code_point << 10) | (codeunit & 0x03FF); in UTF16ToUTF8() 481 require(code_point <= 0x10FFFF); in UTF16ToUTF8() 482 if (code_point <= 0x7F && maxoutput >= 1) { in UTF16ToUTF8() 484 utf8[s8idx++] = code_point & 0x7F; in UTF16ToUTF8() 485 } else if (code_point <= 0x7FF && maxoutput >= 2) { in UTF16ToUTF8() 487 utf8[s8idx++] = 0xC0 | (code_point >> 6); in UTF16ToUTF8() 488 utf8[s8idx++] = 0x80 | (code_point & 0x3F); in UTF16ToUTF8() [all …]
|
/external/rust/crates/idna/src/ |
D | punycode.rs | 83 let mut code_point = INITIAL_N; in decode() localVariable 131 if i / (length + 1) > u32::MAX - code_point { in decode() 137 code_point += i / (length + 1); in decode() 139 let c = match char::from_u32(code_point) { in decode() 245 let mut code_point = INITIAL_N; in encode_into() localVariable 255 .filter(|&c| c >= code_point) in encode_into() 258 if min_code_point - code_point > (u32::MAX - delta) / (processed + 1) { in encode_into() 262 delta += (min_code_point - code_point) * (processed + 1); in encode_into() 263 code_point = min_code_point; in encode_into() 266 if c < code_point { in encode_into() [all …]
|
/external/antlr/tool/src/main/java/org/antlr/codegen/ |
D | RubyTarget.java | 375 int code_point = 0; in getTargetCharLiteralFromANTLRCharLiteral() local 383 code_point = literal.codePointAt( 1 ); in getTargetCharLiteralFromANTLRCharLiteral() 386 code_point = 10; in getTargetCharLiteralFromANTLRCharLiteral() 389 code_point = 13; in getTargetCharLiteralFromANTLRCharLiteral() 392 code_point = 9; in getTargetCharLiteralFromANTLRCharLiteral() 395 code_point = 8; in getTargetCharLiteralFromANTLRCharLiteral() 398 code_point = 12; in getTargetCharLiteralFromANTLRCharLiteral() 401 code_point = Integer.parseInt( literal.substring( 2 ), 16 ); in getTargetCharLiteralFromANTLRCharLiteral() 408 code_point = literal.codePointAt( 0 ); in getTargetCharLiteralFromANTLRCharLiteral() 413 return ( "0x" + Integer.toHexString( code_point ) ); in getTargetCharLiteralFromANTLRCharLiteral()
|
/external/libchrome/base/i18n/ |
D | file_util_icu.cc | 117 uint32_t code_point; in ReplaceIllegalCharactersInPath() local 121 code_point); in ReplaceIllegalCharactersInPath() 127 code_point); in ReplaceIllegalCharactersInPath() 132 if (illegal->DisallowedEverywhere(code_point) || in ReplaceIllegalCharactersInPath() 134 illegal->DisallowedLeadingOrTrailing(code_point))) { in ReplaceIllegalCharactersInPath()
|
D | streaming_utf8_validator_unittest.cc | 66 int32_t code_point; in IsStringUtf8() local 67 U8_NEXT(src, char_index, src_len, code_point); in IsStringUtf8() 68 if (!base::IsValidCodepoint(code_point)) in IsStringUtf8()
|
/external/libtextclassifier/native/utils/ |
D | tokenizer-utils.h | 76 const char32 code_point = *it; in TokenizeWithFilter() local 77 FilterResult filter_result = filter(code_point); in TokenizeWithFilter()
|
/external/protobuf/src/google/protobuf/stubs/ |
D | strutil.cc | 2255 int EncodeAsUTF8Char(uint32 code_point, char* output) { in EncodeAsUTF8Char() argument 2258 if (code_point <= 0x7f) { in EncodeAsUTF8Char() 2259 tmp = code_point; in EncodeAsUTF8Char() 2261 } else if (code_point <= 0x07ff) { in EncodeAsUTF8Char() 2263 ((code_point & 0x07c0) << 2) | in EncodeAsUTF8Char() 2264 (code_point & 0x003f); in EncodeAsUTF8Char() 2266 } else if (code_point <= 0xffff) { in EncodeAsUTF8Char() 2268 ((code_point & 0xf000) << 4) | in EncodeAsUTF8Char() 2269 ((code_point & 0x0fc0) << 2) | in EncodeAsUTF8Char() 2270 (code_point & 0x003f); in EncodeAsUTF8Char() [all …]
|
D | strutil.h | 865 inline bool IsValidCodePoint(uint32 code_point) { in IsValidCodePoint() argument 866 return code_point < 0xD800 || in IsValidCodePoint() 867 (code_point >= 0xE000 && code_point <= 0x10FFFF); in IsValidCodePoint() 877 PROTOBUF_EXPORT int EncodeAsUTF8Char(uint32 code_point, char* output);
|
/external/tensorflow/tensorflow/core/kernels/ |
D | unicode_ops.cc | 552 int32 code_point = input_tensor_flat(idx); in Compute() local 554 if (!U_IS_UNICODE_CHAR(code_point)) { in Compute() 560 code_point = error_options_.subst; in Compute() 563 appendable_unicode_string.appendCodePoint(code_point); in Compute()
|
/external/llvm/utils/unittest/googletest/src/ |
D | gtest.cc | 1435 char* CodePointToUtf8(UInt32 code_point, char* str) { in CodePointToUtf8() argument 1436 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1438 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1439 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1441 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1442 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1443 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1445 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1446 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1447 str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx in CodePointToUtf8() [all …]
|
/external/llvm-project/llvm/utils/unittest/googletest/src/ |
D | gtest.cc | 1759 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument 1760 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1761 return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")"; in CodePointToUtf8() 1765 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1767 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1768 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1770 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1771 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1772 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1774 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/external/libvpx/libvpx/third_party/googletest/src/src/ |
D | gtest.cc | 1804 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument 1805 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1806 return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")"; in CodePointToUtf8() 1810 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1812 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1813 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1815 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1816 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1817 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1819 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/third_party/googletest/src/ |
D | gtest.cc | 1768 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument 1769 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1770 return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")"; in CodePointToUtf8() 1774 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1776 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1777 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1779 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1780 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1781 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1783 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/external/mesa3d/src/gtest/src/ |
D | gtest.cc | 1764 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument 1765 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1766 return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; in CodePointToUtf8() 1770 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1772 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1773 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1775 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1776 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1777 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1779 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/external/googletest/googletest/src/ |
D | gtest.cc | 1930 std::string CodePointToUtf8(uint32_t code_point) { in CodePointToUtf8() argument 1931 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1932 return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; in CodePointToUtf8() 1936 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1938 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1939 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1941 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1942 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1943 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1945 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/external/libaom/libaom/third_party/googletest/src/googletest/src/ |
D | gtest.cc | 1868 std::string CodePointToUtf8(uint32_t code_point) { in CodePointToUtf8() argument 1869 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1870 return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; in CodePointToUtf8() 1874 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1876 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1877 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1879 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1880 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1881 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1883 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|