Lines Matching refs:ch
84 const uint32_t ch = GetUtf16FromUtf8(&utf8_data_in); in ConvertModifiedUtf8ToUtf16() local
85 const uint16_t leading = GetLeadingUtf16Char(ch); in ConvertModifiedUtf8ToUtf16()
86 const uint16_t trailing = GetTrailingUtf16Char(ch); in ConvertModifiedUtf8ToUtf16()
113 const uint32_t ch = GetUtf16FromUtf8(&p); in ConvertModifiedUtf8ToUtf16() local
114 const uint16_t leading = GetLeadingUtf16Char(ch); in ConvertModifiedUtf8ToUtf16()
115 const uint16_t trailing = GetTrailingUtf16Char(ch); in ConvertModifiedUtf8ToUtf16()
137 const uint16_t ch = *utf16_in++; in ConvertUtf16ToModifiedUtf8() local
138 if (ch > 0 && ch <= 0x7f) { in ConvertUtf16ToModifiedUtf8()
139 *utf8_out++ = ch; in ConvertUtf16ToModifiedUtf8()
145 if ((ch >= 0xd800 && ch <= 0xdbff) && (char_count > 0)) { in ConvertUtf16ToModifiedUtf8()
154 const uint32_t code_point = (ch << 10) + ch2 - 0x035fdc00; in ConvertUtf16ToModifiedUtf8()
163 if (ch > 0x07ff) { in ConvertUtf16ToModifiedUtf8()
165 *utf8_out++ = (ch >> 12) | 0xe0; in ConvertUtf16ToModifiedUtf8()
166 *utf8_out++ = ((ch >> 6) & 0x3f) | 0x80; in ConvertUtf16ToModifiedUtf8()
167 *utf8_out++ = (ch & 0x3f) | 0x80; in ConvertUtf16ToModifiedUtf8()
170 *utf8_out++ = (ch >> 6) | 0xc0; in ConvertUtf16ToModifiedUtf8()
171 *utf8_out++ = (ch & 0x3f) | 0x80; in ConvertUtf16ToModifiedUtf8()
243 const uint16_t ch = *chars++; in CountUtf8Bytes() local
244 if (LIKELY(ch != 0 && ch < 0x80)) { in CountUtf8Bytes()
248 if (ch < 0x800) { in CountUtf8Bytes()
252 if (ch >= 0xd800 && ch < 0xdc00) { in CountUtf8Bytes()
270 static inline constexpr bool NeedsEscaping(uint16_t ch) { in NeedsEscaping() argument
271 return (ch < ' ' || ch > '~'); in NeedsEscaping()
274 std::string PrintableChar(uint16_t ch) { in PrintableChar() argument
277 if (NeedsEscaping(ch)) { in PrintableChar()
278 StringAppendF(&result, "\\u%04x", ch); in PrintableChar()
280 result += static_cast<std::string::value_type>(ch); in PrintableChar()
292 uint32_t ch = GetUtf16FromUtf8(&p); in PrintableString() local
293 if (ch == '\\') { in PrintableString()
295 } else if (ch == '\n') { in PrintableString()
297 } else if (ch == '\r') { in PrintableString()
299 } else if (ch == '\t') { in PrintableString()
302 const uint16_t leading = GetLeadingUtf16Char(ch); in PrintableString()
310 const uint32_t trailing = GetTrailingUtf16Char(ch); in PrintableString()