Cm5StringStream.eat method
Cm5StringStream › eat
Unofficial
If the next character in the stream matches the given argument, it is consumed and returned.Signature:
eat(match: string | RegExp | ((char: string) => boolean)): stringParameters:
| Parameter | Type | Description |
|---|---|---|
| match | string | RegExp | ((char: string) => boolean) | A character, regular expression, or predicate function. |
Returns: string — The matched character, or empty string if no match.