readEol

Tries to read immediatly an EOL in range and returns it.

readEol
(
Range
)
(
ref Range range
)
if (
isInputRange!Range &&
isSomeChar!(ElementType!Range)
)

Examples

1 auto text0 = "";
2 assert(readEol(text0) == "");
3 auto text1 = " ";
4 assert(readEol(text1) == "");
5 auto text2 = "\n";
6 assert(readEol(text2) == "\n");
7 auto text3 = "\r\n";
8 assert(readEol(text3) == "\r\n");

Meta