Lines Matching refs:haystack

102 	char *haystack, *needle;  in PHP_FUNCTION()  local
110 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
125 if (offset >= 0 && grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0) { in PHP_FUNCTION()
129 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION()
133 RETURN_LONG(found - haystack); in PHP_FUNCTION()
139 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* fIg… in PHP_FUNCTION()
152 char *haystack, *needle; in PHP_FUNCTION() local
160 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
174 is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 ); in PHP_FUNCTION()
181 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
200 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* fIg… in PHP_FUNCTION()
214 char *haystack, *needle; in PHP_FUNCTION() local
221 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
235 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
239 ret_pos = grapheme_strrpos_ascii(haystack, haystack_len, needle, needle_len, offset); in PHP_FUNCTION()
254 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 0 /* f_i… in PHP_FUNCTION()
269 char *haystack, *needle; in PHP_FUNCTION() local
276 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len,… in PHP_FUNCTION()
290 is_ascii = grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0; in PHP_FUNCTION()
297 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
318 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, offset, NULL, 1 /* f_… in PHP_FUNCTION()
543 char *haystack, *needle; in strstr_common_handler() local
549 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len,… in strstr_common_handler()
556 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler()
564 if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { in strstr_common_handler()
565 size_t found_offset = found - haystack; in strstr_common_handler()
568 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler()
577 …ret_pos = grapheme_strpos_utf16(haystack, haystack_len, needle, needle_len, 0, &uchar_pos, f_ignor… in strstr_common_handler()
586 U8_FWD_N(haystack, ret_pos, haystack_len, uchar_pos); in strstr_common_handler()
589 RETURN_STRINGL(haystack, ret_pos); in strstr_common_handler()
591 RETURN_STRINGL(haystack + ret_pos, haystack_len - ret_pos); in strstr_common_handler()