https://issues.dlang.org/show_bug.cgi?id=20184
Issue ID: 20184
Summary: String maxsplit
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
D seems to have no way to limit the number of splits done on a string. This is
possible with Go:
strings.SplitN("one two three", " ", 2)
also Nim:
"one two three".split(maxsplit = 1)
also Python:
'one two three'.split(maxsplit = 1)
also PHP:
explode(' ', 'one two three', 2);
also Ruby:
'one two three'.split(nil, 2)
--