Skip to main content

validate

Function validate 

Source
pub fn validate(bytes: &[u8]) -> Validity
Expand description

Validate bytes as UTF-8, reporting the failure location on error.

Uses simdutf8::compat::from_utf8, whose std-compatible error type carries valid_up_to() and error_len().