Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

equivalent of remove_if in D

Recently I have taken an interest in the D programming language. I just started learning it, and am coming from a C++ background. I am wondering if there is an equivalent of std::remove_if. I only saw remove looking through docs on the dlang site.
If there isn't a direct equivalent, what is the proper or most idiomatic way of achieving the same result in D?
edit: I should add that I am thinking in the context of erase-remove

like image 656
mio iwakura Avatar asked Jul 02 '13 07:07

mio iwakura


1 Answers

there is std.algortihm.remove(pred,Range)(Range) (look a bit further down the page) which does what you ask

like image 112
ratchet freak Avatar answered Oct 07 '22 06:10

ratchet freak