# Args flags This project is trying to simplify the process of making CLI program. it will detect flag for your program and give you ways to have access to list of Flag the program is receiving. ## Example imports: ``` use args_flags_1::{FlagDetect, StaticFlagOnly, StaticFlag, Flag}; ``` #### use (one prefix): ``` let flags: Vec = StaticFlag::get("-", std::env::args()); ``` #### use of more than one prefix (Beta): ``` let flags: Vec = StaticFlag::getn(vec!["--", "-"], std::env::args()); ``` ### use static version #### only flags: ``` let prefix: &str = "-"; let flags: Vec = StaticFlag::get(prefix, std::env::args()); let flags: Vec = StaticFlag::getn(vec![prefix], std::env::args()); ``` #### flags: ``` let prefix: &str = "-"; let flags: Vec = StaticFlag::get(prefix, std::env::args()); let flags: Vec = StaticFlag::getn(vec![prefix], std::env::args()); ``` ### use with struct (no static): ``` let prefix: &str = "-"; let args: std::env::Args = std::env::args(); let detect: FlagDetect = FlagDetect::new(prefix).from_args(args); // gives back value of the flag let s_flag: Option = detect.find("-s"); match s_flag { Some(x) => {}, None => {} } ```