pub fn len_utf8_from_first_byte(b: u8) -> usize {
    match b {
        b if b < 0x80 => 1,
        b if b < 0xe0 => 2,
        b if b < 0xf0 => 3,
        _ => 4
    }
}
/// Given the inital byte of a UTF-8 codepoint, returns the number of
/// bytes required to represent the codepoint.
/// RFC reference : https://tools.ietf.org/html/rfc3629#section-4
Given the inital byte of a UTF-8 codepoint, returns the number of
bytes required to represent the codepoint.
Given the inital byte of a UTF - 8 codepoint returns the number of bytes required to represent the codepoint .
pub fn len_utf8_from_first_byte(b: u8) -> usize {
    match b {
        b if b < 0x80 => 1,
        b if b < 0xe0 => 2,
        b if b < 0xf0 => 3,
        _ => 4
    }
}
pub fn len_utf8_from_first_byte ( b : u8 ) -> usize { match b { b if b < 0x80 => 1 , b if b < 0xe0 => 2 , b if b < 0xf0 => 3 , _ => 4 } }
Given the inital byte of a UTF-8 codepoint, returns the number of
bytes required to represent the codepoint.
Given the inital byte of a UTF - 8 codepoint returns the number of bytes required to represent the codepoint .
b
u8