pub const fn encode_mut(src: &[u8], dst: &mut [u8]) -> usizeExpand description
Encodes bytes to lowercase hex into a flat byte buffer.
Writes ASCII hex characters to dst and returns the number of bytes
written. The output length is min(dst.len(), 2 * src.len()).
ยงExamples
use omp_core::hex;
let mut buf = [0u8; 10];
let n = hex::encode_mut(b"Hello", &mut buf);
assert_eq!(n, 10);
assert_eq!(&buf, b"48656c6c6f");