1 unstable release
Uses old Rust 2015
0.0.1 | Jan 7, 2016 |
---|
#10 in #ascii-string
120 downloads per month
Used in 3 crates
(2 directly)
13KB
266 lines
from-ascii
This crate provides two traits: FromAscii
which creates instances from ascii string (&[u8]
) and FromAsciiRadix
wich creates only integral values with given radix.
The documentation is located at http://knsd.github.io/from-ascii/.
Usage example:
extern crate from_ascii;
use from_ascii::{FromAscii, FromAsciiRadix};
fn main() {
println!("{:?}", f64::from_ascii(b"123.456"));
println!("{:?}", i16::from_ascii_radix(b"FF", 16));
}
lib.rs
:
This crate provides two traits: FromAscii
which creates instances from ascii string (&[u8]
) and FromAsciiRadix
wich creates only integral values with given radix.
Usage example:
extern crate from_ascii;
use from_ascii::{FromAscii, FromAsciiRadix};
fn main() {
println!("{:?}", f64::from_ascii(b"123.456"));
println!("{:?}", i16::from_ascii_radix(b"FF", 16));
}