strstr


Character string search (start position of specified character)

[Classification]

Standard library

[Syntax]

#include <string.h>

char *strstr(const char *s1, const char *s2);

[Return value]

Returns the pointer indicating the character string that has been found. If character string s2 is not found, the null pointer is returned. If s2 indicates a character string with a length of 0, s1 is returned.

[Description]

This function obtains the position of the portion (except the null character (\0)) that first coincides with the character string indicated by s2, in the character string indicated by s1.