]> granicus.if.org Git - php/commitdiff
Remove php_memnstr (it's in ZE now).
authorAndrei Zmievski <andrei@php.net>
Tue, 8 Apr 2003 17:15:43 +0000 (17:15 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 8 Apr 2003 17:15:43 +0000 (17:15 +0000)
ext/standard/php_string.h

index 39ce9ce99321ff57391563341b4e6a2a3a4d2458..7daa3ced9134228df623a01aee3e780cb0ff64ef 100644 (file)
@@ -134,31 +134,6 @@ PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len,
 PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value);
 PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit);
 
-static inline char *
-php_memnstr(char *haystack, char *needle, int needle_len, char *end)
-{
-       char *p = haystack;
-       char ne = needle[needle_len-1];
-
-       end -= needle_len;
-
-       while (p <= end) {
-               if ((p = memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
-                       if (!memcmp(needle, p, needle_len-1)) {
-                               return p;
-                       }
-               }
-               
-               if (p == NULL) {
-                       return NULL;
-               }
-               
-               p++;
-       }
-       
-       return NULL;
-}
-
 PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end); 
 PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end);