Skip to main content

is_hex

Function is_hex 

Source
pub fn is_hex(s: &str, byte_len: Option<usize>) -> bool
Expand description

true iff s parses as hex (with or without 0x). When byte_len is Some(n), also requires the decoded length to equal n bytes — handy for “is this a valid 32-byte hash” checks.