Skip to main content

encode_with_alphabet

Function encode_with_alphabet 

Source
pub fn encode_with_alphabet(
    data: impl AsRef<[u8]>,
    alphabet: Alphabet,
) -> String
Available on crate features alloc only.
Expand description

Encodes bytes to a hex string using the given Alphabet.

ยงExample

assert_eq!(hex::encode_with_alphabet(b"hello", hex::Alphabet::Upper), "68656C6C6F");