Format
#include <string.h> char *strlwr(char *string);
Language Level: Extension
strlwr converts any uppercase letters in the given
null-terminated string to lowercase. Other characters
are not affected.
Return Value
strlwr returns a pointer to the converted
string. There is no error return.
Example
This example makes a copy in all
lowercase of the string General Assembly, and then prints the
copy.
#include <string.h> #include <stdio.h>
int main(void)
{
char *string = "General Assembly";
char *copy;
copy = strlwr(strdup(string));
printf("Expected result: general assembly\n");
printf("strlwr returned: %s\n", copy);
return 0;
/*********************************************
The output should be:
Expected result: general assembly
strlwr returned: general assembly
*********************************************/
}
![]()
strupr -- Convert Lowercase
to Uppercase
_toascii -
_tolower - _toupper -- Convert Character
tolower() -
toupper() -- Convert Character Case
towlower -
towupper -- Convert Wide Character Case
<string.h>