Flag

Represents a command-line flag.

Constructors

this
this(string shortName, string longName, string description)

Constructs a flag.

Members

Functions

formattedName
string formattedName(bool padded)

Returns formatted name, e.g., -h, --help.

matches
bool matches(string query)

Checks whether the given query matches this flag.

Static functions

fromString
Flag fromString(string format, string description)

Creates a flag from a formatted string.

Static variables

PADDING_MISSING_SHORT
enum PADDING_MISSING_SHORT;

Placeholder for padding when there is no short option.

Variables

description
string description;

Description of the flag.

longName
string longName;

Long name, or null.

shortName
string shortName;

Single-character short name, or null.