consuming(_:startingAt:in:)
Process the input string within the specified bounds, beginning at the given index, and return the end position (upper bound) of the match and the produced output.
Declaration
func consuming(_ input: String, startingAt index: String.Index, in bounds: Range<String.Index>) throws -> (upperBound: String.Index, output: Decimal)?Parameters
- input:
An input string to match against.
- index:
The index within
inputat which to begin searching. - bounds:
The bounds within
inputin which to search.
Return Value
The upper bound where the match terminates and a matched instance, or nil if there isn’t a match.