Function hex

Source
pub fn hex() -> Choice<ByteLookupTable, ByteLookupTable>
Expand description

Returns a pattern that will match any hexadecimal character at the start of the input

use bparse::{Pattern, hex};

assert_eq!(hex().eval(b"z"), None);
assert_eq!(hex().eval(b"f"), Some(1));