extras

fnvoid extras(bool help, string versn, Pattern[] options, string doc)

Handles --help and --version options.

Checks if help or version was requested and throws appropriate exceptions.

Parameters

helpWhether to handle --help option.
versnThe version string, or null if --version not supported.
optionsThe parsed options from argv.
docThe documentation string.

Throws

DocoptExitHelp if --help or --version was requested.