Searched refs:code_point (Results 1 – 2 of 2) sorted by relevance
1421 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument1422 if (code_point > kMaxCodePoint4) { in CodePointToUtf8()1423 return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")"; in CodePointToUtf8()1427 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8()1429 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8()1430 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8()1432 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8()1433 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8()1434 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8()1436 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8()[all …]
232 GTEST_API_ std::string CodePointToUtf8(UInt32 code_point);