Function base16::encode_config
source ·
[−]Expand description
Encode input
into a string using the listed config. The resulting string
contains input.len() * 2
bytes.
Example
let data = [1, 2, 3, 0xaa, 0xbb, 0xcc];
assert_eq!(base16::encode_config(&data, base16::EncodeLower), "010203aabbcc");
assert_eq!(base16::encode_config(&data, base16::EncodeUpper), "010203AABBCC");
Availability
This function is only available when the alloc
feature is enabled, as it
needs to produce a String
.