Algorithm remove Tid

monarch_dodra monarchdodra at gmail.com
Wed Jan 22 09:47:08 PST 2014


On Wednesday, 22 January 2014 at 16:48:45 UTC, bearophile wrote:
> monarch_dodra:
>
>> There's no phobos solution for that,
>
> There will be.
>
> In the meantime use:
> items = items.remove(items.countUntil(needle));

Hum... that requires iterating the range twice for a non-RA 
range. And you forgot a save:

items = items.remove(items.save.countUntil(needle));

But it *is* much simpler.

> See also:
> https://d.puremagic.com/issues/show_bug.cgi?id=10959

Thx.

> Bye,
> bearophile



More information about the Digitalmars-d-learn mailing list