.\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .TH index 3 2026-08-10 "Linux man-pages 6.19" .SH NAME index, rindex \- string search character .SH LIBRARY Standard C library .RI ( libc ,\~ \-lc ) .SH SYNOPSIS .nf .B #include .P .BI "[[deprecated]] char *index(const char *" s ", int " c ); .BI "[[deprecated]] char *rindex(const char *" s ", int " c ); .fi .SH DESCRIPTION .BR index () is identical to .BR strchr (3); user the latter instead. .P .BR rindex () is identical to .BR strrchr (3); use the latter instead. .SH STANDARDS None. .SH HISTORY 4.3BSD; marked as LEGACY in POSIX.1-2001; removed in POSIX.1-2008. .SH SEE ALSO .BR strchr (3), .BR strrchr (3)