cli-parser
Introduction
This library provides a very light-weight API, for a singular purpose: Collect the command line arguments in 3 std
structures based on the number of dashes prefixed.
- Vector $\leftarrow$ 0 dashes $\leftarrow$ Positional arguments (values only).
- HashSet $\leftarrow$ 1 dash $\leftarrow$ Flags (keys only).
- HashMap $\leftarrow$ 2 dashes $\leftarrow$ Key - value pairs.
Syntax example:
These arguments are classified as:
- Positional:
./my_program
path/to/file
- Flags:
verb
- Pairs:
debug_level
with value2
Usage
Just initialize the CLIParser struct and you are good to go.
use CLIParser;