Function utf8ValidCodepoint [src]
Returns true if the given unicode codepoint can be encoded in UTF-8.
  Prototype
 pub fn utf8ValidCodepoint(value: u21) bool  Parameters
value: u21 Source
 pub fn utf8ValidCodepoint(value: u21) bool {
    return switch (value) {
        0xD800...0xDFFF => false, // Surrogates range
        0x110000...0x1FFFFF => false, // Above the maximum codepoint value
        else => true,
    };
}