Keil Logo


#include <string.h>

unsigned char *strrpbrk (
  const unsigned char *string,   /* string to search */
  const unsigned char *set);     /* characters to find */

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

#include <string.h>
#include <stdio.h> /* for printf */

void tst_strrpbrk (void) {
  unsigned char vowels [] ="AEIOUaeiou";
  unsigned char text [] = "American National Standards Institute";
  unsigned char *p;

  p = strpbrk (text, vowels);

  if (p == NULL)
    printf ("No vowels found in %s\n", text);
    printf ("Last vowel is at %s\n", p);
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.