strpbrk
Locates the first occurrence in one string of any character from another string
#include <string.h> char *strpbrk ( const char *str, const char *charset);
The strpbrk function returns a pointer to the located character or NULL if no character from charset occurs in str.
The strpbrk function locates the first occurrence in the string pointed to by str of any character from the string pointed to by charset.
#include <string.h> main () { char *p; p = "Find all vowels"; while (p != NULL) { printf ("%s\n", p); p = strpbrk (p+1, "aeiouAEIOU"); } }
produces the following:
Find all vowels ind all vowels all vowels owels els