Next: strcat, Previous: strcasecmp, Up: Strings

### 5.19 `strcasestr`—case-insensitive character string search

Synopsis

         #include <string.h>
         char *strcasestr(const char *s, const char *find);

Description
`strcasestr` searchs the string s for the first occurrence of the sequence find. `strcasestr` is identical to `strstr` except the search is case-insensitive.

Returns

A pointer to the first case-insensitive occurrence of the sequence find or `NULL` if no match was found.

Portability
`strcasestr` is in the Berkeley Software Distribution.

`strcasestr` requires no supporting OS subroutines. It uses tolower() from elsewhere in this library.