codepoint_width_2

Function codepoint_width_2 

Source
pub open spec fn codepoint_width_2(byte1: u8, byte2: u8) -> u32
Expand description
recommends
is_leading_byte_width_2(byte1),
is_continuation_byte(byte2),
{ (leading_bits_width_2(byte1) << 6) | continuation_bits(byte2) }

The codepoint encoded by the given 2 bytes, assuming that they are a valid leading and continuation byte, respectively, for 2-byte UTF-8 encoding.