MCPcopy Index your code
hub / github.com/RustPython/RustPython / utf8_first_byte

Function utf8_first_byte

crates/wtf8/src/core_str.rs:9–11  ·  view source on GitHub ↗
(byte: u8, width: u32)

Source from the content-addressed store, hash-verified

7/// for width 3, and 3 bits for width 4.
8#[inline]
9const fn utf8_first_byte(byte: u8, width: u32) -> u32 {
10 (byte & (0x7F >> width)) as u32
11}
12
13/// Returns the value of `ch` updated with continuation byte `byte`.
14#[inline]

Callers 2

next_code_pointFunction · 0.70
next_code_point_reverseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected