strchr

Example: strchrString Manipulation Functions

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

char *strchr( const char *string, int c);

stringThe string that is searched.
cThe character that is searched for in the string.

Return Values

strchr returns the pointer to the first occurrence of a character in a string. If character is found, returns a pointer to the first occurrence of c in string. If not, it returns NULL.