1index(3) Library Functions Manual index(3)
2
3
4
6 index, rindex - locate character in string
7
9 Standard C library (libc, -lc)
10
12 #include <strings.h>
13
14 [[deprecated]] char *index(const char *s, int c);
15 [[deprecated]] char *rindex(const char *s, int c);
16
18 index() is identical to strchr(3).
19
20 rindex() is identical to strrchr(3).
21
22 Use strchr(3) and strrchr(3) instead of these functions.
23
25 None.
26
28 4.3BSD; marked as LEGACY in POSIX.1-2001. Removed in POSIX.1-2008,
29 recommending strchr(3) and strrchr(3) instead.
30
32 strchr(3), strrchr(3)
33
34
35
36Linux man-pages 6.05 2023-03-30 index(3)