English
Language : 

CC78K0S Datasheet, PDF (243/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 10 LIBRARY FUNCTIONS
6-10 strstr
Character String/Memory Functions
FUNCTION
The string function strstr returns a pointer to the first occurrence in the string to be searched of a specified
string.
HEADER
string.h
FUNCTION PROTOTYPE
char *strstr (const char *s1, const char *s2);
Function
strstr
Arguments
s1... Pointer to string to be
searched
s2 ... Pointer to specified string
Return Value
• Pointer to the first
appearance in the string s1
of the string s2 if s2 is
found in s1
• Null pointer if s2 is not
found in s1
• Value of s1 if s2 is a null
string
EXPLANATION
• The strstr function returns a pointer to the first appearance in the string pointed to by s1 of the string pointed
to by s2 (except the null terminator of s2).
• If the string s2 is not found in the string s1, the function returns a null pointer.
• If the string s2 is a null string, the function returns the value of s1.
User’s Manual U14872EJ1V0UM
243