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.

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

View source

Parameters

Name Type Description
predicate Func<Char, Boolean> The predicate to test characters with.

Returns

Int32

The number of characters advanced.