diff --git a/include/libc/string.h b/include/libc/string.h index 1f95ae3..e3086ae 100644 --- a/include/libc/string.h +++ b/include/libc/string.h @@ -43,7 +43,6 @@ extern void *memset(void * s,int c,size_t count); extern void *memcpy(void * dest,const void *src,size_t count); extern void *memmove(void * dest,const void *src,size_t count); extern int memcmp(const void * cs,const void * ct,size_t count); -extern char *strstr(const char * s1,const char * s2); extern void *memchr(const void *s, int c, size_t n); extern char *strdup( const char *str ); diff --git a/libc/string.c b/libc/string.c index 9afaabd..199878e 100644 --- a/libc/string.c +++ b/libc/string.c @@ -346,28 +346,6 @@ int memcmp(const void * cs,const void * ct,size_t count) return res; } -/** - * strstr - Find the first substring in a %NUL terminated string - * @s1: The string to be searched - * @s2: The string to search for - */ -char * strstr(const char * s1,const char * s2) -{ - int l1, l2; - - l2 = strlen(s2); - if (!l2) - return (char *) s1; - l1 = strlen(s1); - while (l1 >= l2) { - l1--; - if (!memcmp(s1,s2,l2)) - return (char *) s1; - s1++; - } - return NULL; -} - /** * memchr - Find a character in an area of memory. * @s: The memory area