Lines Matching refs:haystack

104 	char *haystack, *needle;  in PHP_FUNCTION()  local
112 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
127 if (offset >= 0 && grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0) { in PHP_FUNCTION()
131 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION()
135 RETURN_LONG(found - haystack); in PHP_FUNCTION()
141 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* fIg… in PHP_FUNCTION()
154 char *haystack, *needle; in PHP_FUNCTION() local
162 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
176 is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 ); in PHP_FUNCTION()
183 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
202 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* fIg… in PHP_FUNCTION()
216 char *haystack, *needle; in PHP_FUNCTION() local
223 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
237 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
241 ret_pos = grapheme_strrpos_ascii(haystack, haystack_len, needle, needle_len, offset); in PHP_FUNCTION()
256 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* f_i… in PHP_FUNCTION()
271 char *haystack, *needle; in PHP_FUNCTION() local
278 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
292 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
299 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
320 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* f_… in PHP_FUNCTION()
545 char *haystack, *needle; in strstr_common_handler() local
551 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len,… in strstr_common_handler()
558 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler()
566 if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { in strstr_common_handler()
567 size_t found_offset = found - haystack; in strstr_common_handler()
570 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler()
579 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, 0, &uchar_pos, f_ignor… in strstr_common_handler()
588 U8_FWD_N(haystack, ret_pos, haystack_len, uchar_pos); in strstr_common_handler()
591 RETURN_STRINGL(haystack, ret_pos); in strstr_common_handler()
593 RETURN_STRINGL(haystack + ret_pos, haystack_len - ret_pos); in strstr_common_handler()