1 unstable release

Uses old Rust 2015

0.0.1 Jan 7, 2016

#10 in #ascii-string

Download history 37/week @ 2024-03-12 22/week @ 2024-03-19 38/week @ 2024-03-26 55/week @ 2024-04-02 21/week @ 2024-04-09 21/week @ 2024-04-16 41/week @ 2024-04-23 33/week @ 2024-04-30 87/week @ 2024-05-07 32/week @ 2024-05-14 33/week @ 2024-05-21 18/week @ 2024-05-28 23/week @ 2024-06-04 46/week @ 2024-06-11 22/week @ 2024-06-18 25/week @ 2024-06-25

120 downloads per month
Used in 3 crates (2 directly)

MIT license

13KB
266 lines

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


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

No runtime deps