2.1.2.61 strstr


Description

Find a substring.

Syntax

LPSTR strstr( LPCSTR lpcszString, LPCSTR lpcszSubString )

Parameters

lpcszString
[input]String to search through
lpcszSubString
[input] Substring to search for

Return

Returns a pointer to the first character of first substring in string.

Examples

EX1

void strstr_ex1()
{
    char str1[] = "I saw 3 blind mice";
    char * pdest = strstr(str1, "blind");
    out_str(pdest);
}	// The output is "blind mice".

Remark

Find a substring.

See Also

Header to Include

origin.h

Reference