Skip to main content

latin1_length_from_utf8

Function latin1_length_from_utf8 

Source
pub fn latin1_length_from_utf8(src: &[u8]) -> usize
Expand description

Count the number of code units that the UTF-8 string would require in Latin1 format.

This function does not validate the input. It is acceptable to pass invalid UTF-8 strings but in such cases the result is implementation defined.