2 releases
0.1.1 | Oct 15, 2024 |
---|---|
0.1.0 | Oct 13, 2024 |
#5 in #empty
412 downloads per month
7KB
83 lines
A library made for easier command line argument management
Initially it was supposed to be a boilerplate module for my own command line utilities but it looked pretty easy to make a library You might want to write this yourself for your usecase if my library doesn't help you.
At the moment I haven't tested this library fully, please beware of possible errors even though there shouldn't be any.
uhm.. functions included in the library:
get_full_args
Returnsenv::args().collect()
(the arguments)get_lones
Returns the lone / independent arguments in order. Returns an empty vec if there is noneget_next_arg
Returns the specified argument / option’s next argument in anOption<String>
get_options
Returns the options (“-argument”) in a vector. Returns an empty vector if there is noneget_place
Uses the input text and tells you where it is in the args vector, returns anOption<usize>
is_arg
Checks if an argument exists