is a simple, easy to use command line parameter parser.
Hazelnupp does not support windows-, or bsd-style arguments. Only unix-style.
What is the unix-style? This:
```
# Using a long parameter
a.out --long-parameter 1234
```
```
# Using an abbreviated parameter
a.out -lp 1234
```
## Note
These examples reference exceptions. These are not enabled by default. The default behaviour for user-fault exceptions is to produce output to `stderr` and kill the process.
To enable exceptions, call this method:
```cpp
Hazelnupp args;
args.SetCrashOnFail(false);
```
## What's the concept?
The concept is that each parameter must be one of five types. These are:
* Void
* Int
* Float
* String
* List (non-recursive)
Here are examples on how to create them
```
# Void
a.out --foo
# Int
a.out --foo 5
# Float
a.out --foo 5.5
# String
a.out --foo peter
# List (any type above works)
a.out --foo peter jake jeff billy
# List, mixed types
a.out --foo 1 2 3 4 peter willy billy bob 3
```
These parameters can then be accessed via a simple lookup!
## Minimal working example
So what's the simplest way to use Hazelnupp to work with command-line parameters? See:
# This is not supported. It would think -ltr is one parameter.
a.out -ltr
# Instead do this
a.out -l -t -r
```
## LICENSE
```
Copyright (c) 2021, Leon Etienne
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.