pub fn has_invalid_options(&self, valid_opts: &[&str]) -> bool {
        for option in &self.options {
            if !valid_opts.contains(&&option[..]) {
                return true;
            }
        }

        false
    }
/// Returns a boolean for the question "Does the command include any invalid options based upon valid options defined in `valid_opts`?"
///
/// # Examples
/// Define valid options in a slice or array and pass a reference to this data structure as an argument to the method.
///
/// ```
/// const VALIDOPTS: [&str; 5] = [
///       "-h",
///       "--help",
///       "--usage",
///       "-v",
///       "--version"
/// ];
///
/// let c = commandlines::Command::new();
///
/// if c.has_invalid_options(&VALIDOPTS) {
///     eprintln!("Invalid option detected");
/// }
/// ```
Returns a boolean for the question "Does the command include any invalid options based upon valid options defined in `valid_opts`?"
Returns a boolean for the question " Does the command include any invalid options based upon valid options defined in ` valid_opts ` ? "
pub fn has_invalid_options(&self, valid_opts: &[&str]) -> bool {
        for option in &self.options {
            if !valid_opts.contains(&&option[..]) {
                return true;
            }
        }
        false
    }
pub fn has_invalid_options ( & self , valid_opts : & [ & str ] ) -> bool { for option in & self . options { if ! valid_opts . contains ( & & option [ .. ] ) { return true ; } } false }
Returns a boolean for the question "Does the command include any invalid options based upon valid options defined in `valid_opts`?"
Returns a boolean for the question " Does the command include any invalid options based upon valid options defined in ` valid_opts ` ? "
&self
valid_opts
&[&str]
&self
valid_opts
&[&str]
examples
Define valid options in a slice or array and pass a reference to this data structure as an argument to the method.



let c = commandlines::Command::new().

if c.has_invalid_options(&VALIDOPTS) {
eprintln!("Invalid option detected");
}
```
Define valid options in a slice or array and pass a reference to this data structure as an argument to the method . let c = commandlines :: Command :: new () . if c . has_invalid_options ( &VALIDOPTS ) { eprintln! ( " Invalid option detected " ) ; } ` ` `