Function core::slice::memchr::contains_zero_byte
const: 1.65.0 · source · const fn contains_zero_byte(x: usize) -> bool🔬This is a nightly-only experimental API. (
slice_internals)Expand description
Returns true if x contains any zero byte.
From Matters Computational, J. Arndt:
“The idea is to subtract one from each of the bytes and then look for bytes where the borrow propagated all the way to the most significant bit.”