strstr

Search for a substring.

char * strstr (char * string, char * substring);

Required Header
<string.h>

Return Value

The substring position in string is returned. NULL indicates the substring cannot be found.

Parameters

string

  A string to search

substring

  A string to look for

Remarks

The strstr function searches for the first substring within string. The search does not include the null-terminator character.

String

See Also    memcpy, strcat, strcmp