[][src]Function reader::input

pub fn input(text: &'static str) -> String

Read a String.

This function works in a similar way to the python "input" function, that receives as an argument a sentence that will be displayed on the screen and returns a String.

Examples

Basic usage

extern crate reader;
use reader::input;

let name = input("Enter your name: ");
println!("Your name is: {}", name);