| 104 | } |
| 105 | |
| 106 | BASEKIT_API int UArray_clipBeforeEndOf_(UArray *self, const UArray *other) { |
| 107 | long index = UArray_find_(self, other); |
| 108 | /* |
| 109 | printf("UArray_find_('%s', '%s')\n", UArray_bytes(self), |
| 110 | UArray_bytes(other)); printf("find index = %i\n", index); printf("prefix |
| 111 | sizeInBytes = %i\n", UArray_sizeInBytes(other)); printf("prefix size = |
| 112 | %i\n", UArray_size(other)); |
| 113 | */ |
| 114 | if (index > -1 && other->size) { |
| 115 | // printf("UArray_removeRange(0, %i)\n", index + other->size - 1); |
| 116 | UArray_removeRange(self, 0, index + other->size); |
| 117 | // printf("result = '%s'\n", UArray_bytes(self)); |
| 118 | return 1; |
| 119 | } |
| 120 | |
| 121 | return 0; |
| 122 | } |
| 123 | |
| 124 | BASEKIT_API int UArray_clipAfter_(UArray *self, const UArray *other) { |
| 125 | long index = UArray_find_(self, other); |
no test coverage detected