Last change
on this file since 577 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
689 bytes
|
Line | |
---|
1 | /* |
---|
2 | FUNCTION |
---|
3 | <<rindex>>---reverse search for character in string |
---|
4 | |
---|
5 | INDEX |
---|
6 | rindex |
---|
7 | |
---|
8 | SYNOPSIS |
---|
9 | #include <string.h> |
---|
10 | char * rindex(const char *<[string]>, int <[c]>); |
---|
11 | |
---|
12 | DESCRIPTION |
---|
13 | This function finds the last occurence of <[c]> (converted to |
---|
14 | a char) in the string pointed to by <[string]> (including the |
---|
15 | terminating null character). |
---|
16 | |
---|
17 | This function is identical to <<strrchr>>. |
---|
18 | |
---|
19 | RETURNS |
---|
20 | Returns a pointer to the located character, or a null pointer |
---|
21 | if <[c]> does not occur in <[string]>. |
---|
22 | |
---|
23 | PORTABILITY |
---|
24 | <<rindex>> requires no supporting OS subroutines. |
---|
25 | |
---|
26 | QUICKREF |
---|
27 | rindex - pure |
---|
28 | */ |
---|
29 | |
---|
30 | #include <string.h> |
---|
31 | #include <strings.h> |
---|
32 | |
---|
33 | char * |
---|
34 | rindex (const char *s, |
---|
35 | int c) |
---|
36 | { |
---|
37 | return strrchr (s, c); |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.