import std.stdio: writeln; import std.string: split; static import std.algorithm; static import std.array; void main() { auto s = " a message "; writeln(split(s)); writeln(std.algorithm.splitter(s)); writeln(std.array.splitter(s)); } Output, DMD 2.060alpha: ["a", "message"] ["", "a", "message"] ["", "a", "message"] Expected output: ["a", "message"] ["a", "message"] ["a", "message"]
Taking this too. Any other split-related bug I missed?
(In reply to comment #1) > Taking this too. Any other split-related bug I missed? I don't know what you have missed, but see also: http://d.puremagic.com/issues/show_bug.cgi?id=4764 http://d.puremagic.com/issues/show_bug.cgi?id=5838 http://d.puremagic.com/issues/show_bug.cgi?id=6730 http://d.puremagic.com/issues/show_bug.cgi?id=7689
https://github.com/D-Programming-Language/phobos/pull/1502