pub fn opt_default(&self, nm: &str, def: &str) -> Option<String> {
        match self.opt_val(nm) {
            Some(Val(s)) => Some(s),
            Some(_) => Some(def.to_string()),
            None => None,
        }
    }
/// Returns the matching string, a default, or `None`.
///
/// Returns `None` if the option was not present, `def` if the option was
/// present but no argument was provided, and the argument if the option was
/// present and an argument was provided.
Returns the matching string, a default, or `None`.
Returns `None` if the option was not present, `def` if the option was
present but no argument was provided, and the argument if the option was
present and an argument was provided.
Returns the matching string a default or ` None ` . Returns ` None ` if the option was not present ` def ` if the option was present but no argument was provided and the argument if the option was present and an argument was provided .
pub fn opt_default(&self, nm: &str, def: &str) -> Option<String> {
        match self.opt_val(nm) {
            Some(Val(s)) => Some(s),
            Some(_) => Some(def.to_string()),
            None => None,
        }
    }
pub fn opt_default ( & self , nm : & str , def : & str ) -> Option < String > { match self . opt_val ( nm ) { Some ( Val ( s ) ) => Some ( s ) , Some ( _ ) => Some ( def . to_string ( ) ) , None => None , } }
Returns the matching string, a default, or `None`.
Returns the matching string a default or ` None ` .
&self
nm
&str
def
&str
&self
nm
&str
def
&str