Function base16::encode_upper
source ·
[−]Expand description
Encode bytes as base16, using upper case characters for nibbles between
10 and 15 (A
through F
).
This is equivalent to base16::encode_config(bytes, base16::EncodeUpper)
.
Example
assert_eq!(base16::encode_upper(b"Hello World"), "48656C6C6F20576F726C64");
assert_eq!(base16::encode_upper(&[0xff, 0xcc, 0xaa]), "FFCCAA");
Availability
This function is only available when the alloc
feature is enabled, as it
needs to produce a String
.