oak-core 0.0.11

Core parser combinator library providing fundamental parsing primitives.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::source::SimdScanner;

/// Counts how many ASCII digits are at the start of the byte slice.
#[inline]
#[allow(dead_code)]
pub fn count_ascii_digit_prefix(bytes: &[u8]) -> usize {
    SimdScanner::skip_ascii_digits(bytes)
}

/// Counts how many ASCII hexadecimal digits are at the start of the byte slice.
#[inline]
#[allow(dead_code)]
pub fn count_ascii_hexdigit_prefix(bytes: &[u8]) -> usize {
    SimdScanner::skip_ascii_hexdigits(bytes)
}