Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / index.c
blob4a67885121551bedc30f59af18777e5c7ec02173
1 /*
2 FUNCTION
3 <<index>>---search for character in string
5 INDEX
6 index
8 SYNOPSIS
9 #include <strings.h>
10 char * index(const char *<[string]>, int <[c]>);
12 DESCRIPTION
13 This function finds the first occurence of <[c]> (converted to
14 a char) in the string pointed to by <[string]> (including the
15 terminating null character).
17 This function is identical to <<strchr>>.
19 RETURNS
20 Returns a pointer to the located character, or a null pointer
21 if <[c]> does not occur in <[string]>.
23 PORTABILITY
24 <<index>> requires no supporting OS subroutines.
26 QUICKREF
27 index - pure
30 #include <string.h>
31 #include <strings.h>
33 char *
34 index (const char *s,
35 int c)
37 return strchr (s, c);