First experience with std.algorithm: I had to resort to writing a

bearophile bearophileHUGS at lycos.com
Tue Jun 8 04:59:34 PDT 2010


Bernard Helyer:
> bool contains(T)(const(T)[] l, T a)
> {
>       foreach(e; l) {
>           if (a == e) {
>              return true;
>           }
>       }
>       return false;
> }

See also:
http://d.puremagic.com/issues/show_bug.cgi?id=3923

Bye,
bearophile


More information about the Digitalmars-d mailing list