PatchworkOS
Loading...
Searching...
No Matches
strrchr.c
Go to the documentation of this file.
1
#include <
string.h
>
2
3
char
*
strrchr
(
const
char
* s,
int
c)
4
{
5
size_t
i = 0;
6
7
while
(s[i++])
8
{
9
/* EMPTY */
10
}
11
12
do
13
{
14
if
(s[--i] == (
char
)c)
15
{
16
return
(
char
*)s + i;
17
}
18
}
while
(i);
19
20
return
NULL
;
21
}
NULL
#define NULL
Pointer error value.
Definition
NULL.h:23
string.h
strrchr
char * strrchr(const char *s, int c)
Definition
strrchr.c:3
src
libstd
functions
string
strrchr.c
Generated by
1.9.8