Function nom::character::is_hex_digit

source ·
pub fn is_hex_digit(chr: u8) -> bool
Expand description

Tests if byte is ASCII hex digit: 0-9, A-F, a-f

§Example

assert_eq!(is_hex_digit(b'a'), true);
assert_eq!(is_hex_digit(b'9'), true);
assert_eq!(is_hex_digit(b'A'), true);
assert_eq!(is_hex_digit(b'x'), false);