https://issues.dlang.org/show_bug.cgi?id=20184
Alex <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #4 from Alex <[email protected]> --- As a workaround, this is possible: ´´´ import std; void main() { "one two three four".fun1(1).writeln; "one two three four".fun2(2).writeln; } auto fun1(string s, size_t num) { size_t summe; auto r = s.splitter(' ').take(num).tee!(a => summe += a.length + 1).array; return r ~ s[summe .. $]; } auto fun2(string s, size_t num) { auto i = s.splitter(' ').take(num); return i.array ~ s[i.map!(el => el.length).sum + num .. $]; } ´´´ If the splitter construct allowed public access to its underlying range, more convenient solutions were possible. --
