Design Pattern Examples
Overview of object-oriented design patterns
strstri.c File Reference

Implementation of the strstri() function, case-insensitive string search for narrow character strings. More...

#include <ctype.h>
#include <stddef.h>
#include "strstri.h"
Include dependency graph for strstri.c:

Go to the source code of this file.

Functions

char * strstri (const char *s1, const char *s2)
 Do case-insensitive search for string 2 (s2) in string 1 (s1). Similar to the C library's strstr().
 

Detailed Description

Implementation of the strstri() function, case-insensitive string search for narrow character strings.

Function to search for one string in another in a case-insensitive way (otherwise this is identical to the standard C library function strstr()).

Definition in file strstri.c.

Function Documentation

◆ strstri()

char * strstri ( const char *  s1,
const char *  s2 
)

Do case-insensitive search for string 2 (s2) in string 1 (s1). Similar to the C library's strstr().

Parameters
s1Pointer to the string to search
s2Pointer to the string to search for
Returns
Pointer into the string to search where the first match was found; otherwise, return NULL.

Definition at line 35 of file strstri.c.

Referenced by replace_stri().