Lines Matching refs:haystack_len

85 	size_t haystack_len, needle_len;  in PHP_FUNCTION()  local
92 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
96 if ( OUTSIDE_STRING(loffset, haystack_len) ) { in PHP_FUNCTION()
103 noffset = offset >= 0 ? offset : (int32_t)haystack_len + offset; in PHP_FUNCTION()
107 if (offset >= 0 && grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0) { in PHP_FUNCTION()
111 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION()
121 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* fIg… in PHP_FUNCTION()
135 size_t haystack_len, needle_len; in PHP_FUNCTION() local
142 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
146 if ( OUTSIDE_STRING(loffset, haystack_len) ) { in PHP_FUNCTION()
156 is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 ); in PHP_FUNCTION()
160 int32_t noffset = offset >= 0 ? offset : (int32_t)haystack_len + offset; in PHP_FUNCTION()
163 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
164 zend_str_tolower(haystack_dup, haystack_len); in PHP_FUNCTION()
166 found = php_memnstr(haystack_dup + noffset, needle_dup, needle_len, haystack_dup + haystack_len); in PHP_FUNCTION()
182 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* fIg… in PHP_FUNCTION()
197 size_t haystack_len, needle_len; in PHP_FUNCTION() local
203 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
207 if ( OUTSIDE_STRING(loffset, haystack_len) ) { in PHP_FUNCTION()
217 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
221 ret_pos = grapheme_strrpos_ascii(haystack, haystack_len, needle, needle_len, offset); in PHP_FUNCTION()
236 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* f_i… in PHP_FUNCTION()
252 size_t haystack_len, needle_len; in PHP_FUNCTION() local
258 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
262 if ( OUTSIDE_STRING(loffset, haystack_len) ) { in PHP_FUNCTION()
272 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
279 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
280 zend_str_tolower(haystack_dup, haystack_len); in PHP_FUNCTION()
282 ret_pos = grapheme_strrpos_ascii(haystack_dup, haystack_len, needle_dup, needle_len, offset); in PHP_FUNCTION()
300 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* f_… in PHP_FUNCTION()
527 size_t haystack_len, needle_len; in strstr_common_handler() local
531 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len,… in strstr_common_handler()
538 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler()
546 if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { in strstr_common_handler()
552 RETURN_STRINGL(found, haystack_len - found_offset); in strstr_common_handler()
559 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, 0, &uchar_pos, f_ignor… in strstr_common_handler()
568 U8_FWD_N(haystack, ret_pos, haystack_len, uchar_pos); in strstr_common_handler()
573 RETURN_STRINGL(haystack + ret_pos, haystack_len - ret_pos); in strstr_common_handler()