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

#957 in Text processing

Download history 87/week @ 2024-11-15 93/week @ 2024-11-22 122/week @ 2024-11-29 188/week @ 2024-12-06 122/week @ 2024-12-13 57/week @ 2024-12-20 21/week @ 2024-12-27 87/week @ 2025-01-03 101/week @ 2025-01-10 75/week @ 2025-01-17 86/week @ 2025-01-24 108/week @ 2025-01-31 264/week @ 2025-02-07 92/week @ 2025-02-14 179/week @ 2025-02-21 91/week @ 2025-02-28

647 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