Task to throw away string parts, use joiner and splitter not very successful
monarch_dodra
monarchdodra at gmail.com
Thu Jan 2 07:50:03 PST 2014
On Wednesday, 1 January 2014 at 07:40:40 UTC, Dfr wrote:
> And one more problem here:
>
> string name = "test";
> auto nameparts = splitter(name, '.');
> writeln(typeof(joiner(nameparts, ".").array).stringof);
>
> This prints "dchar[]", but i need char[] or string, how to get
> my 'string' back ?
It's actually because "joiner" returns a range of dchar. It's
kind of inefficient actually. If you instead write a minimal
"RangeJoiner", you can get:
More information about the Digitalmars-d-learn
mailing list