parse_arguments_rs
Easy way to deal with parsing commandline arguments
Crate on crates.io.
Documentation on docs.rs or by running cargo doc --open
.
TODO
- the key nor the value can have any spaces because of the nature of
std::env::args
. I will try to fix it at some point. the hashmap function clones strings which could be more efficient - maybe with string slicesthe function would own whateverstd::env::Args
returns, so using an&str
, or even a&'static str
would result in a dangling pointer. Afaik, using string slices wouldn't be possible in rust.