nextWordUntil

Returns the next word in the range passed as argument.

nextWordUntil
(
Range
T
)
(
ref Range range
,
)

Parameters

range
Type: Range

A character input range. The range is consumed for each word.

charTester
Type: T

Defines the opposite of the valid characters to make a word.

Return Value

Type: auto

A string containing the word. If the result length is null then the range parameter has not been consumed.

Examples

1 auto src = "azertyuiop
2 sdfghjk".dup;
3 auto skp = CharRange("\r\n\t".dup);
4 auto w = nextWordUntil(src, skp);
5 assert(w == "azertyuiop");

Meta