Function scolapasta_hex::escape_byte

source ·
pub const fn escape_byte(byte: u8) -> &'static str
Expand description

Map from a u8 to a hex encoded string literal.

§Examples

assert_eq!(scolapasta_hex::escape_byte(0), "00");
assert_eq!(scolapasta_hex::escape_byte(0x20), "20");
assert_eq!(scolapasta_hex::escape_byte(255), "ff");