Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions utf8Validate

1
2
3
4
5
6
7
module juptune.data.utf8;

Result utf8Validate(
    alias AlgorithmT = Utf8DefaultAlgorithm
)(
    const void[] input
);

Documentation

Validates that the entirety of the given input is a correct, well-formed UTF-8 string.

Params

Throws

Utf8Error.invalid, Utf8Error.tooShort, Utf8Error.tooLong, Utf8Error.overlong, Utf8Error.tooLarge, Utf8Error.surrogate, and Utf8Error.eof. Please see their documentation on what conditions trigger them.

Returns

A non-errorful Resultif inputis a valid UTF-8 string, otherwise a Resultroughly specifying why inputis invalid.