text.valid_utf8()
Tests for well-formed UTF-8.
Signature
text.valid_utf8(value)
Parameters
Text or a packed byte span.
Returns
Boolean.
Behavior
Atom text is already validated. Reads the packed span without mutation.
Errors
Unsupported type or invalid packed view.
Example
use text
use binary
assert(not text.valid_utf8(binary.unhex('eda080')))