Command.singleMatch

Tuple!(int, LeafPattern) singleMatch(Pattern[] left)

Finds a single match for this command in the left array.

Matches against an Argument whose value equals this command's name.

Parameters

leftThe array of patterns to search.

Returns

A tuple of (index, matched_command) or (-1, null) if not found.