Searches a string for the last occurrence of a character.
Compatibility:This function is compatible with the following targets:
|
|
#include <string.h>
char *strrchr(const char *s, int c);Parameters:
Parameters for this facility are:
strrchr() returns a pointer to the character found or returns a null pointer (NULL) if it fails.
#include <string.h>
#include <stdio.h>
int main(void)
{
static char s[] = "Marvin Melany Metrowerks";
puts(strrchr(s, 'M'));
return 0;
}
Output:
Metrowerks
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000