I am doing something in C which requires use of the strings (as most programs do).
Looking in the manpages, I found, at string(3):
char * index(const char *s, int c)
char * strchr(const char *s, int c)
The strchr()/index() function locates the first occurrence of c in the string
pointed to by s. The terminating null character is considered to be part of the
string; therefore if c is '\0', the functions locate the terminating '\0'.
strchr() is part of the C standard library.
index() is a now deprecated POSIX function. The POSIX specification recommends implementing
index() as a macro that expands to a call to
index() is deprecated in POSIX and not part of the C standard library, you should use
The second parameter is of type
int because in C, character constants (like
'a') are of type