Skip to main content

hex_value

Function hex_value 

Source
pub const fn hex_value(b: u8) -> Option<u8>
Expand description

The value of one hex digit (either case), or None.

ยงExamples

use parse_net::class::hex_value;

assert_eq!(hex_value(b'A'), Some(10));
assert_eq!(hex_value(b'g'), None);