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

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

Errors

Returns the zero-sized basic::Utf8Error 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.