pub fn input(prompt: &str) -> String
Expand description

Shows a prompt to the user and reads a line from stdin.

It is similar to Python’s input() function.

Examples

let name = jabba_lib::jconsole::input("Name: ");
// assume you type "Anna" (without quotes) and press Enter
assert_eq!(name, "Anna");