Crates.io | from-ascii |
lib.rs | from-ascii |
version | 0.0.1 |
source | src |
created_at | 2016-01-07 08:24:54.357503 |
updated_at | 2016-01-07 08:24:54.357503 |
description | Traits which creates instances from ascii string. |
homepage | |
repository | https://github.com/knsd/from-ascii/ |
max_upload_size | |
id | 3843 |
size | 15,289 |
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));
}