Strchr function – Zilog Z80380 User Manual
Page 78

Library Functions
Run Time Environment
4–14
UM004001-COR1103
strchr
FUNCTION
Header file statement:
#include <string.h>
Syntax:
char *strchr
(const char *string, int c);
The strchr function returns a pointer to the first occurrence of c (converted to char) in string.
The converted character c may be the null character (‘\0’); the terminating null character of
string is included in the search. The function returns NULL if the character is not found.
The strchr function operates on null-terminated strings. The string arguments to these func-
tions are expected to contain a null character (‘\0’) marking the end of the string.
Return Value
The return values for this function are described above.
Parameter
Description
string
Source string
c
Character to be located