[Issue 16288] New: splitter() that doesn't eat sentinels
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 18 02:03:34 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16288
Issue ID: 16288
Summary: splitter() that doesn't eat sentinels
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
I want a version of splitter that doesn't eat the sentinels.
I want to split AT the sentinels, but the sentinel should be the first
element of the bucket.
eg: assert(equal(splitter("hello world", ' '), [ "hello", " ", " world" ]));
Note the weird behaviour since there are 2 spaces. More useful when
the data is not strings.
--
More information about the Digitalmars-d-bugs
mailing list