Function digit

Source
pub fn digit() -> ByteLookupTable
Expand description

Returns a pattern that will match any ascii digit at the start of the input

use bparse::{Pattern, digit};

assert_eq!(digit().eval(b"a"), None);
assert_eq!(digit().eval(b"8"), Some(1));