Merging one Array with Another
Andrea Fontana via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 6 09:05:14 PDT 2015
On Friday, 1 May 2015 at 19:08:51 UTC, Per Nordlöw wrote:
> What's the fastest Phobos-way of doing either
>
> x ~= y; // append
> x = x.uniq; // remove duplicates
>
> or
>
> x = (x ~ y).uniq; // append and remove duplicates in one go
>
> provided that
>
> T[] x, y;
>
> ?
Maybe a way like this could be useful:
http://dpaste.dzfl.pl/7b4b37b490a7
More information about the Digitalmars-d-learn
mailing list