Skip to main content

hex_string_upper

Function hex_string_upper 

Source
pub fn hex_string_upper(src: &[u8]) -> String
Available on crate feature alloc only.
Expand description

Encodes src as an owned uppercase hexadecimal string.

This is the uppercase counterpart of hex_string: each byte produces two ASCII digits without a prefix or separators. Available with alloc.

§Panics

Panics on the same capacity overflows as hex_string. Allocation failure follows the allocator’s error handling.

§Examples

assert_eq!(faster_hex::hex_string_upper(&[0, 0xab, 0xff]), "00ABFF");