max_utf8_len

Function max_utf8_len 

Source
pub const fn max_utf8_len(latin1_len: usize) -> usize
Expand description

Calculate maximum UTF-8 length for a Latin1 string.

Each Latin1 byte can expand to at most 2 UTF-8 bytes.