Do you want add contains and remove item Function in array?
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 5 07:18:59 PST 2015
"FrankLike" wrote in message news:yuinuamnmiqjxqatrvmv at forum.dlang.org...
> But do you have some better way for remove item ?
> such as c#: array.remove(item) ,array.removeAt(index)?
There is http://dlang.org/phobos/std_algorithm.html#.remove which can be
used like removeAt(index).
array = array.remove(3);
And it looks like there's an overload that can remove matching elements like
this:
array = array.remove!(e => e == value);
More information about the Digitalmars-d
mailing list