rocket::mtls::x509::der_parser::asn1_rs::nom::character

Function is_hex_digit

Source
pub fn is_hex_digit(chr: u8) -> bool
Available on crate feature mtls only.
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);