fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / string / index.c
blob6c165f952963fbf9fafc4353b5d383f8790ecd1b
1 /*
2 FUNCTION
3 <<index>>---search for character in string
5 INDEX
6 index
8 ANSI_SYNOPSIS
9 #include <string.h>
10 char * index(const char *<[string]>, int <[c]>);
12 TRAD_SYNOPSIS
13 #include <string.h>
14 char * index(<[string]>, <[c]>);
15 char *<[string]>;
16 int *<[c]>;
18 DESCRIPTION
19 This function finds the first occurence of <[c]> (converted to
20 a char) in the string pointed to by <[string]> (including the
21 terminating null character).
23 This function is identical to <<strchr>>.
25 RETURNS
26 Returns a pointer to the located character, or a null pointer
27 if <[c]> does not occur in <[string]>.
29 PORTABILITY
30 <<index>> requires no supporting OS subroutines.
32 QUICKREF
33 index - pure
36 #include <string.h>
38 char *
39 _DEFUN (index, (s, c),
40 _CONST char *s _AND
41 int c)
43 return strchr (s, c);