1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use std::io::{stdin, stdout, Write};

pub fn input(input_string: &str) -> String {
    print!("{}", input_string);
    let mut input = String::new();

    stdout().flush().expect("Failed to flush stdout!");
    stdin().read_line(&mut input).expect("Failed to read line");

    input.pop();

    return input;
}