Skip to main content

is_valid

Function is_valid 

Source
pub fn is_valid(bytes: &[u8]) -> bool
Expand description

Fast yes/no UTF-8 check using simdutf8::basic::from_utf8.

Prefer this when the location of any error is not needed: the basic flavour has a zero-sized error type and is the fastest option.