Function aoko::standard::functions::fun::read_line [−][src]
Expand description
Reads a line of input from the standard input stream.
Returns a Some
value when content is not empty.
Examples
use aoko::standard::functions::fun::*;
// If you ensure the input is not empty, or want to panic if it is empty, use:
read_line().unwrap();
// If you want to return a default value when the input is empty, use:
read_line().unwrap_or(String::from("default_value"));
// If you just want empty value is "", use:
read_line().unwrap_or_default();