fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / string / strlwr.c
blobcf0d45f7150f79a69cab707bef600b73c4a07e81
1 /*
2 FUNCTION
3 <<strlwr>>---force string to lower case
5 INDEX
6 strlwr
8 ANSI_SYNOPSIS
9 #include <string.h>
10 char *strlwr(char *<[a]>);
12 TRAD_SYNOPSIS
13 #include <string.h>
14 char *strlwr(<[a]>)
15 char *<[a]>;
17 DESCRIPTION
18 <<strlwr>> converts each characters in the string at <[a]> to
19 lower case.
21 RETURNS
22 <<strlwr>> returns its argument, <[a]>.
24 PORTABILITY
25 <<strlwr>> is not widely portable.
27 <<strlwr>> requires no supporting OS subroutines.
29 QUICKREF
30 strlwr
33 #include <string.h>
34 #include <ctype.h>
36 char *
37 strlwr (a)
38 char *a;
40 char *ret = a;
42 while (*a != '\0')
44 if (isupper (*a))
45 *a = tolower (*a);
46 ++a;
49 return ret;