I know, it is foreach loop in question. How about using a reverse for loop like:for (size_t i = arr.length ; i-- > 0 ; ){ arr.remove(i); }
This would be good, if it where for slices. But with associative arrays, this doesn't work. :-(
berni via Digitalmars-d-learn Tue, 03 Sep 2019 23:21:29 -0700
I know, it is foreach loop in question. How about using a reverse for loop like:for (size_t i = arr.length ; i-- > 0 ; ){ arr.remove(i); }
This would be good, if it where for slices. But with associative arrays, this doesn't work. :-(