#user-input #python #string #prompt

simple_input

A simple crate for handling user input, inspired by Python

4 releases (breaking)

Uses old Rust 2015

0.4.0 Dec 2, 2018
0.3.0 Dec 2, 2018
0.2.0 Dec 2, 2018
0.1.0 Dec 2, 2018

#108 in #user-input


Used in rgc

MIT license

3KB

Simple Input

simple_input provides a simple way to ask for user input, inspired by Python's input function.

It only has one function, input(prompt: &str) -> String

extern crate simple_input;
use simple_input::input;
 
fn main() {
    let name = input("What is your name? ");
    println!("Hello {}!", name);
}

lib.rs:

Simple Input

simple_input provides a simple way to ask for user input, inspired by Python's input function.

extern crate simple_input;
use simple_input::input;

fn main() {
    let name = input("What is your name? ");
    println!("Hello {}!", name);
}

No runtime deps