DMD 2.048 (not tested with 2.049): From http://www.digitalmars.com/d/2.0/phobos/std_algorithm.html#Splitter : import std.algorithm void main() { assert(equal(splitter("hello world", ' ') == ["hello", "", "world"]); } -- Some 5 lines of error messages..
Your code has some bugs, try this: import std.algorithm; void main() { assert(equal(splitter("hello world", ' '), ["hello", "", "world"])); } Unless you have other problems, you may close this bug report as ivalid.
*I* was missing a closing bracket right there, sorry. But the documentation is the one having the "==" instead of ",". Docs: assert(equal(splitter("hello world", ' ') == [ "hello", "", "world" ])); Should be: assert(equal(splitter("hello world", ' '), [ "hello", "", "world" ])); So that needs fixing. :)
Fixed: http://www.dsource.org/projects/phobos/changeset/2168