#hex-string #convert-hex #byte-string #literals #syntax #extension #plugin

nightly hex_literals

Macro that converts hex strings to byte strings

7 releases

Uses old Rust 2015

0.1.6 Apr 30, 2017
0.1.5 Sep 3, 2016
0.1.4 Apr 4, 2016
0.1.3 Feb 1, 2016
0.1.1 Nov 11, 2015

#12 in #convert-hex

MIT/Apache

7KB
54 lines

Simple syntax extension that converts hex strings into byte strings.

#![feature(plugin)]
#![plugin(hex_literals)]

fn main() {
    // prints "[0, 255]"
    println!("{:?}", hex!("00ff"))
}

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