whitespace_confFunction parse
Source pub fn parse<'a>(input: &'a str) -> HashMap<&'a str, &'a str>
Expand description
Parses configuration files which are key-value pairs delimited by whitespace.
examples/login_defs.rs (
line 6)
fn main() {
let string = fs::read_to_string("/etc/login.defs").unwrap();
let defs = whitespace_conf::parse(&string);
println!("UID_MIN = {:?}", defs.get("UID_MIN"));
println!("UID_MAX = {:?}", defs.get("UID_MAX"));
}