pub const unsafe fn get_width_assume_valid(byte: u8) -> usize
Expand description

Assuming the input first byte is from a valid UTF-8 character, determine how many bytes are in this UTF-8 character. It returns 1 to 4.

Safety

You must ensure that the input byte is a valid UTF-8 first byte on your own.