dash.parse.vararginFlags
Parse flags from varargin
Syntax
Description
Parses a cell vector of flags into a string vector. Throws error if any elements are not flags.
Parses a cell vector of values with flags beginning on the first element, and spaced with a given spacing.
Customize error messages and IDs.
Input Arguments
inputs
cell vector
The varargin being parsed
spacing
scalar positive integer
The spacing of flags along varargin
nPrevious
scalar positive integer
The number of inputs before varargin in the calling function. (Ignoring object reference in class methods.
header
string scalar
Header for thrown error IDs.
Output Arguments
flags
string vector
The ordered list of flags.