Skip to main content

Module validate

Module validate 

Source
Expand description

UTF-8 validation built on top of simdutf8.

Two flavours are exposed, mirroring the upstream crate:

  • is_valid uses simdutf8::basic for the fastest possible yes/no answer.
  • validate uses simdutf8::compat to additionally report where validation failed, matching the semantics of std::str::from_utf8.

Enums§

Validity
The outcome of validating a byte slice as UTF-8.

Functions§

is_valid
Fast yes/no UTF-8 check using simdutf8::basic::from_utf8.
validate
Validate bytes as UTF-8, reporting the failure location on error.