strpbrk

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

#include <strings.h>
char *strpbrk (
        const char *s1,
        const char *s2
)

Arguments

s1 Pointer to string to be searched
s2 Pointer to string containing the character set

Return Value

A pointer to the character within s2 is returned. NULL is returned if none of the characters in the string pointed to by s2 are contained within the character set.

Explanation

The character string pointed to by s1 is searched for the first occurrence of any character contained in the string pointed to by s2. A pointer to the character within s2 is returned.