—
NAME
index, rindex - locate character in string
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
bash
#include <strings.h>bash
[[deprecated]] char *index(const char *\ns\n, int \nc\n);\n
\n[[deprecated]] char *rindex(const char *\ns\n, int \nc\n);DESCRIPTION
index() is identical to strchr(3).
rindex() is identical to strrchr(3).
Use strchr(3) and strrchr(3) instead of these functions.
STANDARDS
None.
HISTORY
4.3BSD; marked as LEGACY in POSIX.1-2001. Removed in POSIX.1-2008, recommending strchr(3) and strrchr(3) instead.
SEE ALSO
strchr(3), strrchr(3)