Lines Matching refs:ch
114 auto is_lead = [](uint16_t ch) ALWAYS_INLINE { return (ch & 0xfc00u) == 0xd800u; }; in ConvertUtf16ToUtf8()
115 auto is_trail = [](uint16_t ch) ALWAYS_INLINE { return (ch & 0xfc00u) == 0xdc00u; }; in ConvertUtf16ToUtf8()
116 auto is_surrogate = [](uint16_t ch) ALWAYS_INLINE { return (ch & 0xf800u) == 0xd800u; }; in ConvertUtf16ToUtf8()
117 auto is_surrogate_lead = [](uint16_t ch) ALWAYS_INLINE { return (ch & 0x0400u) == 0u; }; in ConvertUtf16ToUtf8()
126 uint16_t ch = utf16[i]; in ConvertUtf16ToUtf8() local
127 if (ch < 0x80u && (kUseShortZero || ch != 0u)) { in ConvertUtf16ToUtf8()
129 append(ch); in ConvertUtf16ToUtf8()
130 } else if (ch < 0x800u) { in ConvertUtf16ToUtf8()
132 append((ch >> 6) | 0xc0); in ConvertUtf16ToUtf8()
133 append((ch & 0x3f) | 0x80); in ConvertUtf16ToUtf8()
135 ? is_surrogate(ch) in ConvertUtf16ToUtf8()
136 : kUse4ByteSequence && is_lead(ch) && has_trail()) { in ConvertUtf16ToUtf8()
137 if (kReplaceBadSurrogates && (!is_surrogate_lead(ch) || !has_trail())) { in ConvertUtf16ToUtf8()
141 uint32_t code_point = get_supplementary(ch, utf16[i + 1u]); in ConvertUtf16ToUtf8()
151 append((ch >> 12) | 0xe0); in ConvertUtf16ToUtf8()
152 append(((ch >> 6) & 0x3f) | 0x80); in ConvertUtf16ToUtf8()
153 append((ch & 0x3f) | 0x80); in ConvertUtf16ToUtf8()