format_hex

Crates.ioformat_hex
lib.rsformat_hex
version0.1.1
created_at2025-02-03 21:44:19.165262+00
updated_at2025-02-09 13:43:23.947688+00
descriptionFormats an [u8] to an hexadecimal multiline format, for human readability
homepage
repositoryhttps://github.com/flogbl/format_hex
max_upload_size
id1541089
size5,918
Florent GABRIEL (flogbl)

documentation

README

format_hex

format_hex formats an [u8] to an hexadecimal multiline format, for human readability.

let (l1, l2, l3) = FormatHex::new()
   .push_hex(b"ABC")
   .push_comment(" deb[")
   .push_hex(b"DEFGHIJ")
   .push_comment("]fin ")
   .push_hex(b"KLMNzZ?\n\r\0")
   .output();
assert_eq!(l1, "ABC deb[DEFGHIJ]fin KLMNzZ?↳←�");
assert_eq!(l2, "444.....4444444.....4444753000");
assert_eq!(l3, "123.....456789A.....BCDEAAFAD0");

License: MIT

Commit count: 8

cargo fmt