leading_byte_width_4

Function leading_byte_width_4 

Source
pub open spec fn leading_byte_width_4(scalar: u32) -> u8
Expand description
recommends
has_width_4_encoding(scalar),
{ 0xF0 | ((scalar >> 18) & 0x7) as u8 }

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