Lines Matching refs:pat_len
1026 mymemfind(const char *mem, Py_ssize_t len, const char *pat, Py_ssize_t pat_len)
1030 /* pattern can not occur in the last pat_len-1 chars */
1031 len -= pat_len;
1035 (pat_len == 1 ||
1036 memcmp(&mem[ii+1], &pat[1], pat_len-1) == 0)) {
1051 mymemcnt(const char *mem, Py_ssize_t len, const char *pat, Py_ssize_t pat_len)
1057 offset = mymemfind(mem, len, pat, pat_len);
1060 mem += offset + pat_len;
1061 len -= offset + pat_len;
1088 const char *pat, Py_ssize_t pat_len, /* pattern string to find */
1097 if (len == 0 || pat_len > len)
1101 nfound = mymemcnt(str, len, pat, pat_len);
1109 new_len = len + nfound*(sub_len - pat_len);
1126 offset = mymemfind(str, len, pat, pat_len);
1132 str += offset + pat_len;
1133 len -= offset + pat_len;
1164 Py_ssize_t len,pat_len,sub_len,out_len;
1170 &str, &len, &pat, &pat_len, &sub, &sub_len,
1173 if (pat_len <= 0) {
1183 new_s = mymemreplace(str,len,pat,pat_len,sub,sub_len,count,&out_len);