pub fn ask_bool(message: &str, critical:bool) -> bool
{
    let prompt = if critical {" (Y, n)"} else {" (y, n)"};

    loop
    {
        let ans = get_input(&[message, prompt].concat());

        match ans.trim()
        {
            "y" => 
            {
                if !critical {return true}
            },
            "Y" => return true,
            "n" | "N" => return false,
            "" => return false,
            _ => {}
        }
    }
}
// Asks the user for a yes/no answer
Asks the user for a yes/no answer
Asks the user for a yes / no answer
pub fn ask_bool(message: &str, critical:bool) -> bool
{
    let prompt = if critical {" (Y, n)"} else {" (y, n)"};
    loop
    {
        let ans = get_input(&[message, prompt].concat());
        match ans.trim()
        {
            "y" => 
            {
                if !critical {return true}
            },
            "Y" => return true,
            "n" | "N" => return false,
            "" => return false,
            _ => {}
        }
    }
}
pub fn ask_bool ( message : & str , critical : bool ) -> bool { let prompt = if critical { " " } else { " " } ; loop { let ans = get_input ( & [ message , prompt ] . concat ( ) ) ; match ans . trim ( ) { " " => { if ! critical { return true } } , " " => return true , " " | " " => return false , " " => return false , _ => { } } } }
Asks the user for a yes/no answer
Asks the user for a yes / no answer
message
&str
critical
bool
message
&str
critical
bool