Last change
on this file since 577 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
580 bytes
|
Line | |
---|
1 | /* |
---|
2 | FUNCTION |
---|
3 | <<strlwr>>---force string to lowercase |
---|
4 | |
---|
5 | INDEX |
---|
6 | strlwr |
---|
7 | |
---|
8 | SYNOPSIS |
---|
9 | #include <string.h> |
---|
10 | char *strlwr(char *<[a]>); |
---|
11 | |
---|
12 | DESCRIPTION |
---|
13 | <<strlwr>> converts each character in the string at <[a]> to |
---|
14 | lowercase. |
---|
15 | |
---|
16 | RETURNS |
---|
17 | <<strlwr>> returns its argument, <[a]>. |
---|
18 | |
---|
19 | PORTABILITY |
---|
20 | <<strlwr>> is not widely portable. |
---|
21 | |
---|
22 | <<strlwr>> requires no supporting OS subroutines. |
---|
23 | |
---|
24 | QUICKREF |
---|
25 | strlwr |
---|
26 | */ |
---|
27 | |
---|
28 | #include <string.h> |
---|
29 | #include <ctype.h> |
---|
30 | |
---|
31 | char * |
---|
32 | strlwr (char *s) |
---|
33 | { |
---|
34 | unsigned char *ucs = (unsigned char *) s; |
---|
35 | for ( ; *ucs != '\0'; ucs++) |
---|
36 | { |
---|
37 | *ucs = tolower(*ucs); |
---|
38 | } |
---|
39 | return s; |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.