knsd / from-ascii

Create instances from ascii string

Home Page:http://knsd.github.io/from-ascii/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

from-ascii Build Status

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));
}

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

About

Create instances from ascii string

http://knsd.github.io/from-ascii/

License:Apache License 2.0


Languages

Language:Rust 100.0%