3 unstable releases

Uses old Rust 2015

0.2.1 Aug 23, 2019
0.2.0 Jun 21, 2018
0.1.0 Jul 23, 2017

#814 in Text processing

Download history 56/week @ 2024-07-23 70/week @ 2024-07-30 104/week @ 2024-08-06 57/week @ 2024-08-13 47/week @ 2024-08-20 84/week @ 2024-08-27 84/week @ 2024-09-03 49/week @ 2024-09-10 81/week @ 2024-09-17 171/week @ 2024-09-24 190/week @ 2024-10-01 194/week @ 2024-10-08 129/week @ 2024-10-15 125/week @ 2024-10-22 188/week @ 2024-10-29 158/week @ 2024-11-05

621 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

26KB
452 lines

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.

No runtime deps