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

Function contains_non_continuation_byte

crates/wtf8/src/core_str_count.rs:98–101  ·  view source on GitHub ↗
(w: usize)

Source from the content-addressed store, hash-verified

96// true)
97#[inline]
98fn contains_non_continuation_byte(w: usize) -> usize {
99 const LSB: usize = usize_repeat_u8(0x01);
100 ((!w >> 7) | (w >> 6)) & LSB
101}
102
103// Morally equivalent to `values.to_ne_bytes().into_iter().sum::<usize>()`, but
104// more efficient.

Callers 1

do_count_charsFunction · 0.85

Calls 1

usize_repeat_u8Function · 0.85

Tested by

no test coverage detected