Crate args_flags_1

Source
Expand description

§Flag Detection Crate

this crate detect flag in syntax command -flag value_of_flag

§Examples

flagfinder -timeout 1000

§Examples

use std::env;

let prefix: &str = "-";
let args: env::Args = env::args();
let detect: FlagDetect = FlagDetect::new(prefix).from_args(args);

// gives back value of the flag
let s_flag: Option<String> = detect.find("-s");
match s_flag {
    Some(x) => {},
    None => {}
}

Structs§

Flag
Flag next value to flag is value for the flag syntax of command used is
FlagDetect
This struct is Vec for our flags implementation of using flags
StaticFlag
Static Flag
StaticFlagOnly
Static Flag Only