pub open spec fn codepoint_width_4(byte1: u8, byte2: u8, byte3: u8, byte4: u8) -> u32Expand description
recommends
is_leading_byte_width_4(byte1),is_continuation_byte(byte2),is_continuation_byte(byte3),is_continuation_byte(byte4),{
(leading_bits_width_4(byte1) << 18) | (continuation_bits(byte2) << 12)
| (continuation_bits(byte3) << 6) | continuation_bits(byte4)
}The codepoint encoded by the given 4 bytes, assuming that they are a valid leading and continuation bytes, respectively, for 4-byte UTF-8 encoding.