【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.2.59 strrchr
Contents
Description
Scan a string for the last occurrence of a character
Syntax
LPSTR strrchr( LPCSTR lpcszStr, int cc )
Parameters
- lpcszStr
- [input] Null terminated source string
- cc
- [input]Character to be located
Return
Returns a pointer to the last occurrence of a character in a string.
Examples
EX1
void strrchr_ex1() { char str1[] = "I saw 3 blind mice"; char* pdest = strrchr(str1,'i'); if(pdest) printf("find the occurrence place \"%s\"\n" , pdest); // output ice else printf("scan failed \n"); }
Remark
See Also
Header to Include
origin.h