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

Function is_alphanumeric

Source
pub fn is_alphanumeric(chr: u8) -> bool
Available on crate feature mtls only.
Expand description

Tests if byte is ASCII alphanumeric: A-Z, a-z, 0-9

ยงExample

assert_eq!(is_alphanumeric(b'-'), false);
assert_eq!(is_alphanumeric(b'a'), true);
assert_eq!(is_alphanumeric(b'9'), true);
assert_eq!(is_alphanumeric(b'A'), true);