Option.singleMatch

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

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

Parameters

leftThe array of patterns to search.

Returns

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