isValidUtf8

fnbool isValidUtf8(const(ubyte)[] bytes) @safe pure nothrow

Validates that bytes is well-formed UTF-8.

This is a low-level check used by the XML parser. It validates UTF-8 structure and rejects overlong encodings, surrogate code points, and code points above U+10FFFF.

Parameters

bytesInput byte sequence.

Returns

true if bytes is valid UTF-8, otherwise false.