index(3)
π index β bestie we need to talk π
okay so real talk, this one's a legacy page, she's giving vintage, she's giving 4.3BSD, and she is deprecated so likeβ¦ read it for the lore but don't build your whole personality on it, mwah π
β¨ NAME β¨
index, rindex β string search character π
π LIBRARY π
Standard C library (libc, -lc) π«Ά
πΈ SYNOPSIS πΈ
#include <strings.h>
[[deprecated]] char *index(const char *s, int c);
[[deprecated]] char *rindex(const char *s, int c);
the [[deprecated]] is RIGHT THERE bestie, it's literally screaming at you, do not ignore her π
π¦ DESCRIPTION π¦
okay so index()? literally the same thing as strchr(3). identical. twins. not a single difference. so please just go use the latter instead, the vibes are better over there β¨
and rindex()? same situation, she is literally strrchr(3). identical, no cap. use the latter instead, that's the whole assignment π«Ά
β STANDARDS β
None. that's it. nothing. the standard said no π iconic of her honestly
π HISTORY π
4.3BSDβ where she was born, main character origin story π- marked as LEGACY in
POSIX.1-2001π - removed in
POSIX.1-2008π
so yeah she got retired, we still love her, we just don't call her anymore π
π SEE ALSO π
and that's the whole page bestie β this was index(3) from the Library Functions Manual, brought to you by Linux man-pages 6.20, dated 2026-08-10. go use strchr and strrchr, hydrate, and slay responsibly π§πβ¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms