module

Dragonstone::Encoding::UTF8

Instance methods

valid?(bytes : Bytes) : Bool

Returns whether bytes are valid UTF-8.

This is a tight DFA-based validator adapted from Crystal's Unicode.valid?, kept here so the resolver/reader can validate input without relying on Crystal's stdlib Unicode module.

Source