Lines Matching refs:needle_len

90 …TCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end…
91 …CALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end…
152 zend_memnstr(const char *haystack, const char *needle, size_t needle_len, const char *end) in zend_memnstr() argument
155 const char ne = needle[needle_len-1]; in zend_memnstr()
159 if (needle_len == 1) { in zend_memnstr()
166 if (needle_len > off_s) { in zend_memnstr()
170 …if (EXPECTED(off_s < 1024 || needle_len < 9)) { /* glibc memchr is faster when needle is too short… in zend_memnstr()
171 end -= needle_len; in zend_memnstr()
174 if ((p = (const char *)memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) { in zend_memnstr()
175 if (!memcmp(needle, p, needle_len-1)) { in zend_memnstr()
189 return zend_memnstr_ex(haystack, needle, needle_len, end); in zend_memnstr()
210 zend_memnrstr(const char *haystack, const char *needle, size_t needle_len, char *end) in zend_memnrstr() argument
213 const char ne = needle[needle_len-1]; in zend_memnrstr()
217 if (needle_len == 1) { in zend_memnrstr()
224 if (needle_len > off_s) { in zend_memnrstr()
228 if (EXPECTED(off_s < 1024 || needle_len < 3)) { in zend_memnrstr()
229 p -= needle_len; in zend_memnrstr()
232 …(p = (const char *)zend_memrchr(haystack, *needle, (p - haystack) + 1)) && ne == p[needle_len-1]) { in zend_memnrstr()
233 if (!memcmp(needle, p, needle_len - 1)) { in zend_memnrstr()
241 return zend_memnrstr_ex(haystack, needle, needle_len, end); in zend_memnrstr()