pub unsafe fn validate_utf8(input: &[u8]) -> Result<(), Utf8Error>
Available with target feature avx2 only.
Expand description

Validation implementation for CPUs supporting the SIMD extension (see module).

Errors

Returns compat::Utf8Error with detailed error information on failure.

Safety

This function is inherently unsafe because it is compiled with SIMD extensions enabled. Make sure that the CPU supports it before calling.