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 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.