Lines Matching refs:self_len

2366     Py_ssize_t self_len, result_len;  in replace_interleave()  local
2370 self_len = PyString_GET_SIZE(self); in replace_interleave()
2374 if (maxcount <= self_len) { in replace_interleave()
2379 count = self_len + 1; in replace_interleave()
2385 if (to_len > (PY_SSIZE_T_MAX - self_len) / count) { in replace_interleave()
2390 result_len = count * to_len + self_len; in replace_interleave()
2412 Py_MEMCPY(result_s, self_s, self_len-i); in replace_interleave()
2425 Py_ssize_t self_len, result_len; in replace_delete_single_character() local
2429 self_len = PyString_GET_SIZE(self); in replace_delete_single_character()
2432 count = countchar(self_s, self_len, from_c, maxcount); in replace_delete_single_character()
2437 result_len = self_len - count; /* from_len == 1 */ in replace_delete_single_character()
2446 end = self_s + self_len; in replace_delete_single_character()
2468 Py_ssize_t self_len, result_len; in replace_delete_substring() local
2472 self_len = PyString_GET_SIZE(self); in replace_delete_substring()
2475 count = stringlib_count(self_s, self_len, in replace_delete_substring()
2484 result_len = self_len - (count * from_len); in replace_delete_substring()
2494 end = self_s + self_len; in replace_delete_substring()
2519 Py_ssize_t self_len; in replace_single_character_in_place() local
2524 self_len = PyString_GET_SIZE(self); in replace_single_character_in_place()
2526 next = findchar(self_s, self_len, from_c); in replace_single_character_in_place()
2534 result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len); in replace_single_character_in_place()
2538 Py_MEMCPY(result_s, self_s, self_len); in replace_single_character_in_place()
2544 end = result_s + self_len; in replace_single_character_in_place()
2566 Py_ssize_t self_len, offset; in replace_substring_in_place() local
2572 self_len = PyString_GET_SIZE(self); in replace_substring_in_place()
2574 offset = stringlib_find(self_s, self_len, in replace_substring_in_place()
2583 result = (PyStringObject *) PyString_FromStringAndSize(NULL, self_len); in replace_substring_in_place()
2587 Py_MEMCPY(result_s, self_s, self_len); in replace_substring_in_place()
2593 end = result_s + self_len; in replace_substring_in_place()
2617 Py_ssize_t self_len, result_len; in replace_single_character() local
2622 self_len = PyString_GET_SIZE(self); in replace_single_character()
2624 count = countchar(self_s, self_len, from_c, maxcount); in replace_single_character()
2633 if (to_len - 1 > (PY_SSIZE_T_MAX - self_len) / count) { in replace_single_character()
2637 result_len = self_len + count * (to_len - 1); in replace_single_character()
2645 end = self_s + self_len; in replace_single_character()
2679 Py_ssize_t self_len, result_len; in replace_substring() local
2684 self_len = PyString_GET_SIZE(self); in replace_substring()
2686 count = stringlib_count(self_s, self_len, in replace_substring()
2698 if (to_len - from_len > (PY_SSIZE_T_MAX - self_len) / count) { in replace_substring()
2702 result_len = self_len + count * (to_len - from_len); in replace_substring()
2710 end = self_s + self_len; in replace_substring()