Skip to content

Cm5StringStream.eatWhile method

Cm5StringStream › eatWhile

Unofficial

Repeatedly calls eat with the given argument, until it fails.

Signature:

eatWhile(match: string | RegExp | ((char: string) => boolean)): boolean

Parameters:

Parameter Type Description
match string | RegExp | ((char: string) => boolean) A character, regular expression, or predicate function.

Returns: booleantrue if any characters were consumed.