Lines Matching refs:code_point
930 static void AppendUTF8(uint32 code_point, std::string* output) { in AppendUTF8() argument
933 if (code_point <= 0x7f) { in AppendUTF8()
934 tmp = code_point; in AppendUTF8()
936 } else if (code_point <= 0x07ff) { in AppendUTF8()
937 tmp = 0x0000c080 | ((code_point & 0x07c0) << 2) | (code_point & 0x003f); in AppendUTF8()
939 } else if (code_point <= 0xffff) { in AppendUTF8()
940 tmp = 0x00e08080 | ((code_point & 0xf000) << 4) | in AppendUTF8()
941 ((code_point & 0x0fc0) << 2) | (code_point & 0x003f); in AppendUTF8()
943 } else if (code_point <= 0x1fffff) { in AppendUTF8()
944 tmp = 0xf0808080 | ((code_point & 0x1c0000) << 6) | in AppendUTF8()
945 ((code_point & 0x03f000) << 4) | ((code_point & 0x000fc0) << 2) | in AppendUTF8()
946 (code_point & 0x003f); in AppendUTF8()
951 StringAppendF(output, "\\U%08x", code_point); in AppendUTF8()
980 static inline bool IsHeadSurrogate(uint32 code_point) { in IsHeadSurrogate() argument
981 return (code_point >= kMinHeadSurrogate) && (code_point < kMaxHeadSurrogate); in IsHeadSurrogate()
984 static inline bool IsTrailSurrogate(uint32 code_point) { in IsTrailSurrogate() argument
985 return (code_point >= kMinTrailSurrogate) && in IsTrailSurrogate()
986 (code_point < kMaxTrailSurrogate); in IsTrailSurrogate()
1008 static const char* FetchUnicodePoint(const char* ptr, uint32* code_point) { in FetchUnicodePoint() argument
1012 if (!ReadHexDigits(p, len, code_point)) return ptr; in FetchUnicodePoint()
1019 if (IsHeadSurrogate(*code_point) && *p == '\\' && *(p + 1) == 'u') { in FetchUnicodePoint()
1023 *code_point = AssembleUTF16(*code_point, trail_surrogate); in FetchUnicodePoint()