 | CARM User's Guide Discontinued |  |
|
|
| strrchr| Summary | | | Description | The strrchr function searches string for the last occurrence of c. The null character terminating string is included in the search. | | Return Value | The strrchr function returns a pointer to the last character c found in string or a null pointer if no matching character was found. | | See Also | strchr, strcspn, strpbrk, strpos, strrpbrk, strrpos, strspn | | Example |
#include <string.h>
#include <stdio.h> /* for printf */
void tst_strrchr (void) {
unsigned char *s;
unsigned char buf [] = "This is a test";
s = strrchr (buf, 't');
if (s != NULL)
printf ("found the last 't' at %s\n", s);
}
|
|
|