[][src]Function read_human::read_string_noquestion

pub fn read_string_noquestion() -> Result<Option<String>>

Get a line of from the user without displaying a question first.

This method converts empty text into None. Any whitespace around the input, including the line ending, will be trimmed.

Examples

let name = read_human::read_string_noquestion()?;
if let Some(name) = name {
    // An empty string would have been converted into `None`
    assert!(name != "");
}