[][src]Function libcli::input::read_num

pub fn read_num(
    num_bytes: usize,
    msg: &str,
    prompt: &str
) -> Result<String, Utf8Error>

Prints a message and prompt to the console Reads num_bytes of stdin to a string Returns Err if read buffer couldn't be converted to valid utf8 Note: num_bytes may not correspond with resulting string length due to multibyte characters Panics if stdin can't be read