import std.stdio; import std.string; void main() { auto x = "test \nsome lines\nout"; foreach(int i, string line; x.byLine()) writefln("%d: %s", i, line); }
Standard input is empty
prog.d(7): Error: undefined identifier module prog.byLine prog.d(7): Error: function expected before (), not module prog.byLine of type void prog.d(7): Error: foreach: int is not an aggregate type
Standard output is empty