MCPcopy Create free account
hub / github.com/devsisters/libquic / IsValidCodepoint

Function IsValidCodepoint

src/base/strings/utf_string_conversion_utils.h:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace base {
17
18inline bool IsValidCodepoint(uint32_t code_point) {
19 // Excludes the surrogate code points ([0xD800, 0xDFFF]) and
20 // codepoints larger than 0x10FFFF (the highest codepoint allowed).
21 // Non-characters and unassigned codepoints are allowed.
22 return code_point < 0xD800u ||
23 (code_point >= 0xE000u && code_point <= 0x10FFFFu);
24}
25
26inline bool IsValidCharacter(uint32_t code_point) {
27 // Excludes non-characters (U+FDD0..U+FDEF, and all codepoints ending in

Callers 2

ReadUnicodeCharacterFunction · 0.85
TruncateUTF8ToByteSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected