Task to throw away string parts, use joiner and splitter not very successful
monarch_dodra
monarchdodra at gmail.com
Thu Jan 2 07:32:15 PST 2014
On Wednesday, 1 January 2014 at 00:19:39 UTC, bearophile wrote:
> Chris Cain:
>
>> From your error message: isForwardRange!Separator
>>
>> Your separator is a character, which isn't a forward range.
>> Try this:
>> `auto name1 = joiner(nameparts[0 .. $-1], ".");`
>
> But splitting on a char is a common operation, and isn't it
> more efficient than splitting on a string?
>
> Bye,
> bearophile
The "separator" here is actually a joiner element.
"splitter(range, '.')" *does* work.
AFAIK, there should be no problem providing a "joiner(RoR, E)". I
think it's on my "todo".
I think the "issue" was that the overload *may* have been
ambiguous...? I'll have to double check.
More information about the Digitalmars-d-learn
mailing list