scan

Crates.ioscan
lib.rsscan
version0.1.0
sourcesrc
created_at2015-08-05 05:03:05.031236
updated_at2015-12-11 23:55:55.315022
descriptionCrate for tokenizing and parsing delimitted input
homepagehttp://github.com/alex-ozdemir/scan
repositoryhttp://github.com/alex-ozdemir/scan
max_upload_size
id2758
size17,060
traits (github:rustcrypto:traits)

documentation

http://alex-ozdemir.github.io/rust/doc/scan

README

scan

A tokenizing/parsing utility for Rust

Allows for whitespace-delimited tokens in an input stream to be parsed as any type implementing FromStr.

Examples

extern crate scan;
use scan::Scan;

fn main() {
  let mut scanner = scan::from_stdin();
  let int = scanner.next::<i32>().unwrap();
  let int2: i32 = scanner.next().unwrap();
  println!("Integer: {}", int);
  println!("Integer 2: {}" int2);
}

Acquire

This crate can be acquired through crates.io. One thing of note is that this crate requires nightly rust, due to instability in the io module.

Documentation

Documentation is hosted here.

Commit count: 0

cargo fmt