Skip to content

SourceReader.AdvanceWhile Method ​

Definition ​

Advances the reader while the specified predicate returns true for the current character, stopping at the end of the file if it is reached first.

c#
public int AdvanceWhile(Func<char, bool> predicate);

View source

Parameters ​

NameTypeDescription
predicateFunc<Char, Boolean>The predicate to test characters with.

Returns ​

Int32

The number of characters advanced.