STRRCHR - find last occurrence of a character in a string.
(ANSI Standard)
Usage:
#include <string.h>
ptr = strrchr( s, c );
Where:
- const char *s;
- points to the string that is to be scanned for the
presence of the character.
- int c;
- is the character to look for.
- char *ptr;
- points to the last occurrence of the character in the
string. If the character does not appear in the string, a
null pointer is returned.
Description:
"strrchr" returns a pointer to the last occurrence
of the character "c" in the string "s".
The '\0' that terminates the string is considered part of the
string; thus it is possible to find the end of the string with a
call like
ptr = strrchr( s, '\0' );
See Also:
expl c lib strchr
Copyright © 1996, Thinkage Ltd.