display_bytes 0.2.1

Human-readable display of byte sequences.
Documentation
  • Coverage
  • 100%
    30 out of 30 items documented1 out of 20 items with examples
  • Size
  • Source code size: 37.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.92 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • abonander/display_bytes
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • abonander

display_bytes Travis Crates.io

Human-readable display of byte sequences.

Supports printing of both UTF-8 and ASCII-only sequences.

extern crate display_bytes;

use display_bytes::{display_bytes, display_bytes_string};

fn main() {
    let bytes = b"Hello, world!\x89\x90\xAB\xCD";
    println!("{:?}", bytes);
    println!("{}", display_bytes(bytes));
    assert_eq!(display_bytes_string(bytes),
               "Hello, world! {{ 89 90 AB CD }}");
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.