ucx/string.c

changeset 213
fa8b745be7b5
parent 210
6bdb04d87236
child 214
2bc19726c340
equal deleted inserted replaced
212:c766c423dee6 213:fa8b745be7b5
214 if (match) { 214 if (match) {
215 (*n)++; 215 (*n)++;
216 for (size_t j = 0 ; j < d.length ; j++) { 216 for (size_t j = 0 ; j < d.length ; j++) {
217 sv.ptr[i+j] = 0; 217 sv.ptr[i+j] = 0;
218 } 218 }
219 i += d.length; 219 i += d.length - 1; // -1, because the loop will do a i++
220 } 220 }
221 } 221 }
222 if ((*n) == nmax) break; 222 if ((*n) == nmax) break;
223 } 223 }
224 result = (sstr_t*) almalloc(allocator, sizeof(sstr_t)*(*n)); 224 result = (sstr_t*) almalloc(allocator, sizeof(sstr_t)*(*n));

mercurial