programming:c:function strrchrWhat links here?
Defined in string.h.

Find last occurrence of character in string.
Returns the last occurrence of c in string.
The null-terminating character is included as part of the string and can also be searched.

Parameters.

Return Value.

Portability.



 const char * strrchr ( const char * string, int c );
       char * strrchr (       char * string, int c );
Both have the same behavior as the original declaration.

Example.

/* strrchr example */
  1. include
  2. include


int main () { char str[] = "This is a sample string"; char * pch; pch=strrchr(str,'s'); printf ("Last occurence of 's' found at %d \n",pch-str+1); return 0; }


Output: Last occurrence of 's' found at 18

See also.
strchr, strcspn, strcmp, strstr, memchr

From http://www.cplusplus.com/ref/
programming:c:function strrchr
X Windows Structures - XEvent
android command line usage
programming:cpp:Cpp Class Static data and functions
X Windows Structures - XMotionEvent
programming - c - structs - _finddata_t
programming - C - function strdup
programming - windows - WM_CREATE
programming:c:function isdigit
programming:c:function fseek
programming:c:function isalnum
programming:c:function strpbrk
programming:c:function strncat
programming:c:function strchr
programming:c:functions:_splitpath
programming:windows:SetWindowText
programming:c:function iscntrl
programming:cpp:Cpp operator overloading
filename:programming:c:function strrchr
filename:programming%3Ac%3Afunction%20strrchr
last edit:March 30 2009 01:08:34 (6436 days ago)
ct = 1794509847.000000 = November 12 2026 18:57:27
ft = 1238375314.000000 = March 30 2009 01:08:34
dt = 556134533.000000