1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

remove Curl_strcasestr() since there is no code at all using this function!

This commit is contained in:
Daniel Stenberg 2008-10-15 09:56:34 +00:00
parent 0a9984c27e
commit 36e56f36ad

View File

@ -76,29 +76,6 @@ int curl_strnequal(const char *first, const char *second, size_t max)
#endif
}
/*
* Curl_strcasestr() finds the first occurrence of the substring needle in the
* string haystack. The terminating `\0' characters are not compared. The
* matching is done CASE INSENSITIVE, which thus is the difference between
* this and strstr().
*/
char *Curl_strcasestr(const char *haystack, const char *needle)
{
#if defined(HAVE_STRCASESTR)
return strcasestr(haystack, needle);
#else
size_t nlen = strlen(needle);
size_t hlen = strlen(haystack);
while(hlen-- >= nlen) {
if(curl_strnequal(haystack, needle, nlen))
return (char *)haystack;
haystack++;
}
return NULL;
#endif
}
#ifndef HAVE_STRLCAT
/*
* The strlcat() function appends the NUL-terminated string src to the end