1INDEX(3)                   Linux Programmer's Manual                  INDEX(3)
2
3
4

NAME

6       index, rindex - locate character in string
7

SYNOPSIS

9       #include <strings.h>
10
11       char *index(const char *s, int c);
12
13       char *rindex(const char *s, int c);
14

DESCRIPTION

16       The  index()  function returns a pointer to the first occurrence of the
17       character c in the string s.
18
19       The rindex() function returns a pointer to the last occurrence  of  the
20       character c in the string s.
21
22       The  terminating  NULL  character  is  considered  to  be a part of the
23       strings.
24

RETURN VALUE

26       The index() and rindex() functions return  a  pointer  to  the  matched
27       character or NULL if the character is not found.
28

CONFORMING TO

30       4.3BSD; marked as LEGACY in POSIX.1-2001.
31

SEE ALSO

33       memchr(3),  strchr(3),  strpbrk(3),  strrchr(3),  strsep(3), strspn(3),
34       strstr(3), strtok(3)
35
36
37
38GNU                               1993-04-12                          INDEX(3)
Impressum