skipEol

Tries to skip immediatly an EOL in range.

void
skipEol
(
Range
)
(
ref Range range
)
if (
isInputRange!Range &&
isSomeChar!(ElementType!Range)
)

Examples

1 auto text0 = "";
2 skipEol(text0);
3 assert(text0 == "");
4 auto text1 = " ";
5 skipEol(text1);
6 assert(text1 == " ");
7 auto text2 = "\n";
8 skipEol(text2);
9 assert(text2 == "");
10 auto text3 = "\r\na";
11 skipEol(text3);
12 assert(text3 == "a");

Meta