Lines Matching full:cut

243        >>> needle = (left := needle[:cut]) + (right := needle[cut:])  in STRINGLIB()
244 where the "local period" of the cut is maximal. in STRINGLIB()
246 The local period of the cut is the minimal length of a string w in STRINGLIB()
253 Crochemore and Perrin (1991) show that this cut can be computed in STRINGLIB()
260 >>> cut, period = factorize(x) in STRINGLIB()
261 >>> x[:cut], (right := x[cut:]) in STRINGLIB()
274 Py_ssize_t cut1, period1, cut2, period2, cut, period; in STRINGLIB() local
278 // Take the later cut. in STRINGLIB()
281 cut = cut1; in STRINGLIB()
285 cut = cut2; in STRINGLIB()
288 LOG("split: "); LOG_STRING(needle, cut); in STRINGLIB()
289 LOG(" + "); LOG_STRING(needle + cut, len_needle - cut); in STRINGLIB()
293 return cut; in STRINGLIB()
307 Py_ssize_t cut;
321 p->cut = STRINGLIB(_factorize)(needle, len_needle, &(p->period)); in STRINGLIB()
322 assert(p->period + p->cut <= len_needle); in STRINGLIB()
325 p->cut * STRINGLIB_SIZEOF_CHAR)); in STRINGLIB()
327 assert(p->cut <= len_needle/2); in STRINGLIB()
328 assert(p->cut < p->period); in STRINGLIB()
333 p->period = Py_MAX(p->cut, len_needle - p->cut) + 1; in STRINGLIB()
366 const Py_ssize_t cut = p->cut; in STRINGLIB() local
397 Py_ssize_t i = Py_MAX(cut, memory); in STRINGLIB()
401 window_last += i - cut + 1; in STRINGLIB()
406 for (i = memory; i < cut; i++) { in STRINGLIB()
420 Py_ssize_t mem_jump = Py_MAX(cut, memory) - cut + 1; in STRINGLIB()
437 Py_ssize_t gap_jump_end = Py_MIN(len_needle, cut + gap); in STRINGLIB()
455 for (Py_ssize_t i = cut; i < gap_jump_end; i++) { in STRINGLIB()
458 assert(gap >= i - cut + 1); in STRINGLIB()
466 assert(i - cut + 1 > gap); in STRINGLIB()
467 window_last += i - cut + 1; in STRINGLIB()
471 for (Py_ssize_t i = 0; i < cut; i++) { in STRINGLIB()