import std.algorithm.comparison: equal; assert(equal("a\nb".byLine!(Newline.native), ["a", "b"].s[])); assert(equal("a\r\nb".byLine!(Newline.win), ["a", "b"].s[])); assert(equal("a\rb".byLine!(Newline.mac), ["a", "b"].s[])); assert(equal("a\nb".byLine!(Newline.unix), ["a", "b"].s[])); assert(equal("a\nb".byLine!(Newline.any), ["a", "b"].s[]));
http://forum.dlang.org/thread/fjqpdfzmitcxxzpwlbgb@forum.dlang.org#post-rwxrytxqqurrazifugje:40forum.dlang.org
TODO This should fail with better error message: assert(equal((cast(ubyte[])"a\nb").byLine!(Newline.any), ["a", "b"]));
Split Input by line.