getsflag: extract the smallest flag

Description Usage Arguments Value Methods (by class) See Also

Description

This method can be used to extract the smallest flag within a single argument or all of the smallest flag within a parser. This interface is primarily thought to be useful for testing and debugging purposes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
getsflag(x, ...)

## S3 method for class 'cmd_arg'
getsflag(x, ...)

## S3 method for class 'cmd_parser'
getsflag(x, ...)

## S3 method for class 'cmd_arg'
getlflag(x, ...)

## S3 method for class 'cmd_parser'
getlflag(x, ...)

Arguments

x

the object to extract values from (usually cmd_arg or cmd_parser)

...

further parameters passed to the specific method

Value

If x is a single argument, a character vector of argument names if x is a cmd_parser, a list is returned with plausible entries "flags", "positional" and "named" for flag, positional and named arguments respectively.

Methods (by class)

See Also

Other parsers: getflags(), getlflag()


Bijaelo/cmdline.arguments documentation built on June 12, 2021, 1:42 p.m.