A minimalistic, (essentially) POSIX-compliant option parser.
getopt parses through options one at a time in the order they are given on
the command line, stopping at the first non-option argument.
```rust
use getopt::prelude::*; use std::{env, error::Error};
fn main() -> Result<(), Box
let mut a_flag = false;
let mut b_flag = String::new();
loop {
    match getopt(&args, "ab:", &mut state)? {
        Opt(None, _) => break,
        Opt(Some('a'), None) => a_flag = true,
        Opt(Some('b'), Some(string)) => b_flag = string,
        _ => unreachable!(),
    }
}
let args = args.split_off(state.index);
// ...
Ok(())
} ```