| 166 | } |
| 167 | |
| 168 | void UArray_rstrip_(UArray *self, const UArray *other) { |
| 169 | size_t index = 0; // initial value is only needed when FOREACHes don't work |
| 170 | |
| 171 | if (UArray_isFloatType(self)) { |
| 172 | UARRAY_RFOREACH( |
| 173 | self, i, v, index = i; if (!UArray_containsDouble_(other, v)) { |
| 174 | index++; |
| 175 | break; |
| 176 | }) |
| 177 | } else { |
| 178 | UARRAY_RFOREACH( |
| 179 | self, i, v, index = i; if (!UArray_containsLong_(other, v)) { |
| 180 | index++; |
| 181 | break; |
| 182 | }) |
| 183 | } |
| 184 | |
| 185 | UArray_removeRange(self, index, self->size); |
| 186 | } |
| 187 | |
| 188 | BASEKIT_API void UArray_strip_(UArray *self, const UArray *other) { |
| 189 | UArray_lstrip_(self, other); |
no test coverage detected