casual
Simple crate for parsing user input.
Usage
use ;
// Rust type inference is used to know what to return.
let username: String = prompt.get;
// `FromStr` is used to parse the input, so you can read any type that
// implements `FromStr`.
let age: u32 = prompt.get;
// A convenience function `confirm` is provided for getting a yes or no answer.
if !confirm
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.