Lines Matching refs:haystack

109 	char *haystack, *needle;  in PHP_FUNCTION()  local
117 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
143 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION()
151 if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { in PHP_FUNCTION()
152 RETURN_LONG(found - haystack); in PHP_FUNCTION()
157 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* fIg… in PHP_FUNCTION()
172 char *haystack, *needle, *haystack_dup, *needle_dup; in PHP_FUNCTION() local
180 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
201 is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 ); in PHP_FUNCTION()
207 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
226 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* fIg… in PHP_FUNCTION()
241 char *haystack, *needle; in PHP_FUNCTION() local
248 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
269 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
273 ret_pos = grapheme_strrpos_ascii(haystack, haystack_len, needle, needle_len, offset); in PHP_FUNCTION()
288 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* f_i… in PHP_FUNCTION()
304 char *haystack, *needle; in PHP_FUNCTION() local
311 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
332 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
339 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
360 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* f_… in PHP_FUNCTION()
592 char *haystack, *needle; in strstr_common_handler() local
598 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len,… in strstr_common_handler()
619 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler()
627 if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { in strstr_common_handler()
628 size_t found_offset = found - haystack; in strstr_common_handler()
631 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler()
640 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, 0, &uchar_pos, f_ignor… in strstr_common_handler()
649 U8_FWD_N(haystack, ret_pos, haystack_len, uchar_pos); in strstr_common_handler()
652 RETURN_STRINGL(haystack, ret_pos); in strstr_common_handler()
654 RETURN_STRINGL(haystack + ret_pos, haystack_len - ret_pos); in strstr_common_handler()