leading_byte_width_2

Function leading_byte_width_2 

Source
pub open spec fn leading_byte_width_2(scalar: u32) -> u8
Expand description
recommends
has_width_2_encoding(scalar),
{ 0xC0 | ((scalar >> 6) & 0x1F) as u8 }

The first byte of the UTF-8 encoding of the given scalar value, assuming that the scalar has a 2-byte UTF-8 encoding.