#include <lcstring.h> char *strlwr(char *str);
strlwr
converts uppercase alphabetic characters ('A' through 'Z')
in the input string str
into lowercase characters ('a' through 'z').
All other characters are unchanged.
strlwr
is not affected by the program's locale.
strlwr
returns the original input string pointer str
.
#include <lcstring.h> #include <stdio.h> #include <stdlib.h> main() { int i; char *names[5]; puts("Enter 5 last names, using only uppercase letters:"); for( i = 0; i < 5; i++){ names[i] = ( char *)malloc(256); printf("Enter name no.%dn",i+1); gets(names[i]); } /* Convert each string in a table to lowercase letters. */ puts("The names you have entered (converted to lowercase) " "are as follows:"); for(i = 0; i < 5; i++) printf("%sn",strlwr(names[i])); }
memlwr
, strupr
, strxlt
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.