Lines Matching refs:maxcount
259 Py_ssize_t maxcount)
267 if (count >= maxcount)
277 /* len(self)>=1, from="", len(to)>=1, maxcount>=1 */
281 Py_ssize_t maxcount)
292 count = min(maxcount, self_len + 1) */
293 if (maxcount <= self_len) {
294 count = maxcount;
297 /* Can't overflow: self_len + 1 <= maxcount <= PY_SSIZE_T_MAX. */
348 /* len(self)>=1, len(from)==1, to="", maxcount>=1 */
351 char from_c, Py_ssize_t maxcount)
362 count = countchar(self_s, self_len, from_c, maxcount);
391 /* len(self)>=1, len(from)>=2, to="", maxcount>=1 */
396 Py_ssize_t maxcount)
409 maxcount);
444 /* len(self)>=1, len(from)==len(to)==1, maxcount>=1 */
448 Py_ssize_t maxcount)
480 while (--maxcount > 0) {
491 /* len(self)>=1, len(from)==len(to)>=2, maxcount>=1 */
496 Py_ssize_t maxcount)
530 while ( --maxcount > 0) {
543 /* len(self)>=1, len(from)==1, len(to)>=2, maxcount>=1 */
548 Py_ssize_t maxcount)
559 count = countchar(self_s, self_len, from_c, maxcount);
607 /* len(self)>=1, len(from)>=2, len(to)>=2, maxcount>=1 */
612 Py_ssize_t maxcount)
625 maxcount);
681 Py_ssize_t maxcount)
687 if (maxcount < 0) {
688 maxcount = PY_SSIZE_T_MAX;
689 } else if (maxcount == 0) {
703 return stringlib_replace_interleave(self, to_s, to_len, maxcount);
710 self, from_s[0], maxcount);
713 self, from_s, from_len, maxcount);
722 self, from_s[0], to_s[0], maxcount);
725 self, from_s, from_len, to_s, to_len, maxcount);
732 self, from_s[0], to_s, to_len, maxcount);
736 self, from_s, from_len, to_s, to_len, maxcount);