Home
last modified time | relevance | path

Searched refs:sub_len (Results 1 – 7 of 7) sorted by relevance

/external/python/cpython3/Objects/stringlib/
Dfind.h9 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in STRINGLIB()
15 if (sub_len == 0) in STRINGLIB()
18 pos = FASTSEARCH(str, str_len, sub, sub_len, -1, FAST_SEARCH); in STRINGLIB()
28 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in STRINGLIB()
34 if (sub_len == 0) in STRINGLIB()
37 pos = FASTSEARCH(str, str_len, sub, sub_len, -1, FAST_RSEARCH); in STRINGLIB()
47 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in STRINGLIB()
50 return STRINGLIB(find)(str + start, end - start, sub, sub_len, start); in STRINGLIB()
55 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in STRINGLIB()
58 return STRINGLIB(rfind)(str + start, end - start, sub, sub_len, start); in STRINGLIB()
Dcount.h9 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in STRINGLIB()
16 if (sub_len == 0) in STRINGLIB()
19 count = FASTSEARCH(str, str_len, sub, sub_len, maxcount, FAST_COUNT); in STRINGLIB()
/external/python/cpython2/Objects/stringlib/
Dfind.h12 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in stringlib_find() argument
19 if (sub_len == 0) in stringlib_find()
22 pos = fastsearch(str, str_len, sub, sub_len, -1, FAST_SEARCH); in stringlib_find()
32 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in stringlib_rfind() argument
39 if (sub_len == 0) in stringlib_rfind()
42 pos = fastsearch(str, str_len, sub, sub_len, -1, FAST_RSEARCH); in stringlib_rfind()
67 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in stringlib_find_slice() argument
71 return stringlib_find(str + start, end - start, sub, sub_len, start); in stringlib_find_slice()
76 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in stringlib_rfind_slice() argument
80 return stringlib_rfind(str + start, end - start, sub, sub_len, start); in stringlib_rfind_slice()
Dcount.h12 const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, in stringlib_count() argument
19 if (sub_len == 0) in stringlib_count()
22 count = fastsearch(str, str_len, sub, sub_len, maxcount, FAST_COUNT); in stringlib_count()
/external/python/cpython3/Objects/
Dbytes_methods.c472 Py_ssize_t sub_len; in find_internal() local
485 sub_len = subbuf.len; in find_internal()
489 sub_len = 1; in find_internal()
493 if (end - start < sub_len) in find_internal()
495 else if (sub_len == 1) { in find_internal()
511 sub, sub_len, start, end); in find_internal()
515 sub, sub_len, start, end); in find_internal()
610 Py_ssize_t sub_len; in _Py_bytes_count() local
626 sub_len = vsub.len; in _Py_bytes_count()
630 sub_len = 1; in _Py_bytes_count()
[all …]
/external/python/cpython2/Modules/
Dstropmodule.c1091 const char *sub, Py_ssize_t sub_len, /* substitution string */ in mymemreplace() argument
1111 delta_len = sub_len - pat_len; in mymemreplace()
1146 memcpy(new_s, sub, sub_len); in mymemreplace()
1147 new_s += sub_len; in mymemreplace()
1173 Py_ssize_t len,pat_len,sub_len,out_len; in strop_replace() local
1179 &str, &len, &pat, &pat_len, &sub, &sub_len, in strop_replace()
1192 new_s = mymemreplace(str,len,pat,pat_len,sub,sub_len,count,&out_len); in strop_replace()
/external/python/cpython2/Objects/
Dstringobject.c1711 Py_ssize_t sub_len; in string_find_internal() local
1720 sub_len = PyString_GET_SIZE(subobj); in string_find_internal()
1727 else if (PyObject_AsCharBuffer(subobj, &sub, &sub_len)) in string_find_internal()
1735 sub, sub_len, start, end); in string_find_internal()
1739 sub, sub_len, start, end); in string_find_internal()
2124 Py_ssize_t sub_len; in string_count() local
2132 sub_len = PyString_GET_SIZE(sub_obj); in string_count()
2144 else if (PyObject_AsCharBuffer(sub_obj, &sub, &sub_len)) in string_count()
2150 stringlib_count(str + start, end - start, sub, sub_len, PY_SSIZE_T_MAX) in string_count()