Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ |
2 | /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ |
||
3 | #include |
||
4 | #include |
||
5 | |||
6 | char * |
||
7 | strrchr(const char *s, int c) |
||
8 | { |
||
9 | char cc = c; |
||
10 | const char *sp=(char *)0; |
||
11 | while (*s) |
||
12 | { |
||
13 | if (*s == cc) |
||
14 | sp = s; |
||
15 | s++; |
||
16 | } |
||
17 | if (cc == 0) |
||
18 | sp = s; |
||
19 | return unconst(sp, char *); |
||
20 | } |
||
21 |