skipWord

Skips the next word in the range passed as argument.

void
skipWord
(
Range
T
bool until = false
)
(
ref Range range
,
)
if (
isInputRange!Range &&
isSomeChar!(ElementType!Range)
&&
)

Parameters

range
Type: Range

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

charTester
Type: T

Defines the valid characters to make a word.

Examples

1 auto src1 = "\t\t\r\ndd";
2 auto skp1 = CharRange("\r\n\t");
3 skipWord(src1, skp1);
4 assert(src1 == "dd");
5 import std.ascii: isWhite;
6 auto src2 = "\t\t\r\nee";
7 skipWord(src2, &isWhite);
8 assert(src2 == "ee");

Meta