Lines Matching refs:code_point
614 // code_point parameter is of type UInt32 because wchar_t may not be
618 // If the code_point is not a valid Unicode code point
621 GTEST_API_ char* CodePointToUtf8(UInt32 code_point, char* str);
2732 // code_point parameter is of type UInt32 because wchar_t may not be
2736 // If the code_point is not a valid Unicode code point
2739 char* CodePointToUtf8(UInt32 code_point, char* str) {
2740 if (code_point <= kMaxCodePoint1) {
2742 str[0] = static_cast<char>(code_point); // 0xxxxxxx
2743 } else if (code_point <= kMaxCodePoint2) {
2745 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2746 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
2747 } else if (code_point <= kMaxCodePoint3) {
2749 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2750 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2751 str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
2752 } else if (code_point <= kMaxCodePoint4) {
2754 str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2755 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2756 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
2757 str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
2765 str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32);