 | C251 User's Guide |  |
|
|
| strrpbrk| Summary | | | Description | The strrpbrk function searches string for the last occurrence of any character from set. The null terminator is not included in the search. | | Return Value | The strrpbrk function returns a pointer to the last matching character in string. If string contains no characters from set, a null pointer is returned. | | See Also | strchr, strcspn, strpbrk, strpos, strrchr, strrpos, strspn | | Example |
#include <string.h>
#include <stdio.h> /* for printf */
void tst_strrpbrk (void) {
char vowels [] ="AEIOUaeiou";
char text [] = "American National Standards Institute";
char *p;
p = strpbrk (text, vowels);
if (p == NULL)
printf ("No vowels found in %s\n", text);
else
printf ("Last vowel is at %s\n", p);
}
|
|
|