Skip to main content

validate_utf8

Function validate_utf8 

Source
pub unsafe fn validate_utf8(input: &[u8]) -> Result<(), Utf8Error>
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.