MCPcopy Create free account
hub / github.com/apache/datafusion / leading_bytes

Function leading_bytes

datafusion/functions/src/string/common.rs:52–54  ·  view source on GitHub ↗
(bytes: &[u8], byte: u8)

Source from the content-addressed store, hash-verified

50/// Returns the number of leading bytes matching `byte`
51#[inline]
52fn leading_bytes(bytes: &[u8], byte: u8) -> usize {
53 bytes.iter().take_while(|&&b| b == byte).count()
54}
55
56/// Returns the number of trailing bytes matching `byte`
57#[inline]

Callers 1

trim_ascii_charMethod · 0.85

Calls 2

countMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…