Crate cluatoi [] [src]

Parsing the byte sequence of the ascii characters and safely converting them to integers. An open library written in the language of system programming Rust is used to analyze and bring the sequence of ascii bytes to many integer primitives of the language Rust (u8, u16, u32, u64, u128, i8, i16, i32, i64, i128). There is the possibility of using the byte iterators to continue parsing byte arrays without creating a separate byte array or byte slice. Capabilities: Convert ASCII byte sequences to integer primitives Rust. Protection against overflow of numbers Accounting for the features of signed, unsigned primitives Return of the transfer in case of an error Using IterByteArray

Use:

extern crate cluatoi; use cluatoi::Atoi;

fn main() { let array = b"-1245"; let isize = isize::atoi(array).unwrap(); // -1245isize let usize = usize::atoi(array).unwrap(); // AtoiErr(ByteUnk(b'-')) let array_end = b"1245T"; let my_int = u64::atoi_end(array_end, b'T').unwrap(); //1245u64 }

Enums

AtoiErr

Result trait Atoi

Traits

Atoi

Parsing the byte sequence of the ascii characters and safely converting them to integers.

Type Definitions

AtoiResult

Type result Atoi