MCPcopy Create free account
hub / github.com/apache/brpc / IsValidCharacter

Function IsValidCharacter

src/butil/strings/utf_string_conversion_utils.h:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23inline bool IsValidCharacter(uint32_t code_point) {
24 // Excludes non-characters (U+FDD0..U+FDEF, and all codepoints ending in
25 // 0xFFFE or 0xFFFF) from the set of valid code points.
26 return code_point < 0xD800u || (code_point >= 0xE000u &&
27 code_point < 0xFDD0u) || (code_point > 0xFDEFu &&
28 code_point <= 0x10FFFFu && (code_point & 0xFFFEu) != 0xFFFEu);
29}
30
31// ReadUnicodeCharacter --------------------------------------------------------
32

Callers 2

TruncateUTF8ToByteSizeFunction · 0.85
IsStringUTF8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected