std.utf.valid_seq

std.utf

valid_seq(seq) -> ok

Validate a complete UTF-8 multi-byte sequence

Checks that seq is a well-formed 2–4 byte UTF-8 sequence. Verifies the leading byte with valid_b1 and checks that all continuation bytes are in range (0x80–0xBF). Also enforces the Unicode-mandated exclusions:

Does not accept single-byte (ASCII) input; use valid for full strings.