Skip to main content

confirm

Function confirm 

Source
fn confirm(question: &str, input: &mut dyn BufRead) -> Result<bool>
Expand description

Asks the user a yes/no question: prints question to stderr without a newline, flushes, and reads one line. Only y or yes, trimmed and ignoring ASCII case, counts; EOF or anything else is no.