On Saturday, 14 December 2013 at 16:00:06 UTC, seany wrote:
the std.algorithm.splitter returns a blank or null (eg a null string "") between two consecuting delimeters.

for example, splitting "hello world" (two spaces between words) will return ["hello" , "", "world"]

is there an improoved version of it, which wont return such a blank/null when multiple delimeters are found consecutively? (i tried to search the tango for d2, but i was not successful, should there be one like this already, it must have escaped my sight)

Just filter out the empty ranges:

r.splitter().filter!(x => !x.empty)

Reply via email to