Home
last modified time | relevance | path

Searched refs:self_len (Results 1 – 6 of 6) sorted by relevance

/external/python/cpython3/Objects/stringlib/
Dtransmogrify.h285 Py_ssize_t self_len, result_len; in stringlib_replace_interleave() local
289 self_len = STRINGLIB_LEN(self); in stringlib_replace_interleave()
293 if (maxcount <= self_len) { in stringlib_replace_interleave()
298 count = self_len + 1; in stringlib_replace_interleave()
304 if (to_len > (PY_SSIZE_T_MAX - self_len) / count) { in stringlib_replace_interleave()
309 result_len = count * to_len + self_len; in stringlib_replace_interleave()
342 memcpy(result_s, self_s, self_len - i); in stringlib_replace_interleave()
355 Py_ssize_t self_len, result_len; in stringlib_replace_delete_single_character() local
359 self_len = STRINGLIB_LEN(self); in stringlib_replace_delete_single_character()
362 count = countchar(self_s, self_len, from_c, maxcount); in stringlib_replace_delete_single_character()
[all …]
/external/python/cpython2/Objects/
Dbytearrayobject.c1594 Py_ssize_t self_len, result_len; in replace_interleave() local
1598 self_len = PyByteArray_GET_SIZE(self); in replace_interleave()
1602 if (maxcount <= self_len) { in replace_interleave()
1607 count = self_len + 1; in replace_interleave()
1613 if (to_len > (PY_SSIZE_T_MAX - self_len) / count) { in replace_interleave()
1618 result_len = count * to_len + self_len; in replace_interleave()
1640 Py_MEMCPY(result_s, self_s, self_len-i); in replace_interleave()
1653 Py_ssize_t self_len, result_len; in replace_delete_single_character() local
1657 self_len = PyByteArray_GET_SIZE(self); in replace_delete_single_character()
1660 count = countchar(self_s, self_len, from_c, maxcount); in replace_delete_single_character()
[all …]
Dstringobject.c2366 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()
[all …]
/external/python/cpython3/Objects/
Dbytearrayobject.c1204 Py_ssize_t self_len = PyByteArray_GET_SIZE(self); in bytearray_removeprefix_impl() local
1208 if (self_len >= prefix_len in bytearray_removeprefix_impl()
1212 self_len - prefix_len); in bytearray_removeprefix_impl()
1215 return PyByteArray_FromStringAndSize(self_start, self_len); in bytearray_removeprefix_impl()
1236 Py_ssize_t self_len = PyByteArray_GET_SIZE(self); in bytearray_removesuffix_impl() local
1240 if (self_len >= suffix_len in bytearray_removesuffix_impl()
1241 && memcmp(self_start + self_len - suffix_len, in bytearray_removesuffix_impl()
1245 self_len - suffix_len); in bytearray_removesuffix_impl()
1248 return PyByteArray_FromStringAndSize(self_start, self_len); in bytearray_removesuffix_impl()
Dbytesobject.c2202 Py_ssize_t self_len = PyBytes_GET_SIZE(self); in bytes_removeprefix_impl() local
2206 if (self_len >= prefix_len in bytes_removeprefix_impl()
2211 self_len - prefix_len); in bytes_removeprefix_impl()
2219 return PyBytes_FromStringAndSize(self_start, self_len); in bytes_removeprefix_impl()
2240 Py_ssize_t self_len = PyBytes_GET_SIZE(self); in bytes_removesuffix_impl() local
2244 if (self_len >= suffix_len in bytes_removesuffix_impl()
2246 && memcmp(self_start + self_len - suffix_len, in bytes_removesuffix_impl()
2250 self_len - suffix_len); in bytes_removesuffix_impl()
2258 return PyBytes_FromStringAndSize(self_start, self_len); in bytes_removesuffix_impl()
/external/rust/crates/clap/src/app/
Dhelp.rs395 let self_len = str_width(arg.to_string().as_str()); in val() localVariable
397 let mut spcs = self.longest - self_len; in val()