Constructor.
void main() { foreach (string line; lines(stdin)) { ... use line ... } }
The line terminator ('\n' by default) is part of the string read (it could be missing in the last line of the file). Several types are supported for line, and the behavior of lines changes accordingly:
In all cases, a two-symbols versions is also accepted, in which case the first symbol (of integral type, e.g. ulong or uint) tracks the zero-based number of the current line.
foreach (ulong i, string line; lines(stdin)) { ... use line ... }
In case of an I/O error, an StdioException is thrown.
Iterates through the lines of a file by using foreach.