Comment #0 by dlang-bugzilla — 2016-10-03T22:08:54Z
/////////////// test.d ///////////////
import std.string;
void main()
{
assert("".split(",").length == 0);
}
//////////////////////////////////////
Introduced in https://github.com/dlang/phobos/pull/4030.
Additionally, the new behavior is inconsistent:
split("") => []
split("", ",") => [""]
splitLines("") => []
Comment #1 by dlang-bugzilla — 2016-10-03T22:10:55Z
Example real-life scenarios:
- Comma-delimited lists in program arguments or configuration files. The string variables will be empty unless populated, then split afterwards.
- `libPaths ~= environment.get("LIBPATH", null).split(":")` will now search the current directory.
Comment #2 by github-bugzilla — 2016-10-04T03:09:03Z