Contents

ArgumentExtractor

A rudimentary helper for extracting options and flags from a list of strings that represent command line arguments.

Declaration

struct ArgumentExtractor

Overview

Create the extractor with the full command line arguments provided, then extract all known options and flags, which leaves the positional arguments.

This does not handle the case where positional arguments (or optional argument values) have the same name as an option or a flag. It only handles the long form of options, not short forms, for example: --<name>, not -n. It respects an argument that consists of two hyphens (--) as an indication that all remaining arguments are positional.

Topics

Creating an Argument Extractor

Inspecting Arguments

Extracting Arguments