Lines Matching refs:pat_len
1028 mymemfind(const char *mem, Py_ssize_t len, const char *pat, Py_ssize_t pat_len) in mymemfind() argument
1033 len -= pat_len; in mymemfind()
1037 (pat_len == 1 || in mymemfind()
1038 memcmp(&mem[ii+1], &pat[1], pat_len-1) == 0)) { in mymemfind()
1053 mymemcnt(const char *mem, Py_ssize_t len, const char *pat, Py_ssize_t pat_len) in mymemcnt() argument
1059 offset = mymemfind(mem, len, pat, pat_len); in mymemcnt()
1062 mem += offset + pat_len; in mymemcnt()
1063 len -= offset + pat_len; in mymemcnt()
1090 const char *pat, Py_ssize_t pat_len, /* pattern string to find */ in mymemreplace() argument
1099 if (len == 0 || pat_len > len) in mymemreplace()
1103 nfound = mymemcnt(str, len, pat, pat_len); in mymemreplace()
1111 delta_len = sub_len - pat_len; in mymemreplace()
1135 offset = mymemfind(str, len, pat, pat_len); in mymemreplace()
1141 str += offset + pat_len; in mymemreplace()
1142 len -= offset + pat_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()
1182 if (pat_len <= 0) { in strop_replace()
1192 new_s = mymemreplace(str,len,pat,pat_len,sub,sub_len,count,&out_len); in strop_replace()