strchr

Searches for the first occurrence of a specified character in a character string

#include <strings.h>
char *strchr (
        const char *s,
        long c
)

Arguments

s Pointer to a character string
c Target character

Return Value

A pointer to the first occurrence of the character c within the string s is returned. NULL is returned if c cannot be found within s.

Explanation

The first occurrence of the character c is located in the string pointed to by s. A pointer to the located character is returned.