Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / strlwr.c
blob7211c59174395fca9c85ca2299e6ac856e2be91f
1 /*
2 FUNCTION
3 <<strlwr>>---force string to lowercase
5 INDEX
6 strlwr
8 SYNOPSIS
9 #include <string.h>
10 char *strlwr(char *<[a]>);
12 DESCRIPTION
13 <<strlwr>> converts each character in the string at <[a]> to
14 lowercase.
16 RETURNS
17 <<strlwr>> returns its argument, <[a]>.
19 PORTABILITY
20 <<strlwr>> is not widely portable.
22 <<strlwr>> requires no supporting OS subroutines.
24 QUICKREF
25 strlwr
28 #include <string.h>
29 #include <ctype.h>
31 char *
32 strlwr (char *s)
34 unsigned char *ucs = (unsigned char *) s;
35 for ( ; *ucs != '\0'; ucs++)
37 *ucs = tolower(*ucs);
39 return s;