INDEX(3) BSD Library Functions Manual INDEX(3)
NAME
index, rindex -- locate character in string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <strings.h>
char *
index(const char *s, int c);
char *
rindex(const char *s, int c);
DESCRIPTION
The index() and rindex() functions have been deprecated in favor of strchr(3) and strrchr(3).
The index() function locates the first occurrence of c (converted to a char) in the string pointed to by s. The terminating null character
is considered part of the string; therefore if c is '