strlwr() function in C
The strlwr( ) function is a built-in function in C and is used to convert a given string into lowercase.
Syntax:
char *strlwr(char *str);
Parameter:
- str: This represents the given string which we want to convert into lowercase.
Returns: It returns the modified string obtained after converting the characters of the given string str to lowercase.
Note: This is a non-standard function that works only with older versions of Microsoft C.
Below programs illustrate the strlwr() function in C:
Example 1:-
// C program to demonstrate // example of strlwr() function #include<stdio.h> #include<string.h> int main() { char str[ ] = "GEEKSFORGEEKS IS THE BEST"; // converting the given string into lowercase. printf("%s\n",strlwr (str)); return 0; } |
Output:
geeksforgeeks is the best
Example 2:-
// C program to demonstrate // example of strlwr() function. #include<stdio.h> #include <string.h> int main() { char str[] = "CompuTer ScienCe PoRTAl fOr geeKS"; printf("Given string is: %s\n",str); printf("\nString after converting to the " "lowercase is: %s",strlwr(str)); return 0; } |
Output:
Given string is: CompuTer ScienCe PoRTAl fOr geeKS String after converting to the lowercase is: computer science portal for geeks
Recommended Posts:
- arc function in C
- iswdigit() function in C/C++
- strtod() function in C/C++
- strrchr() function in C/C++
- strcspn() function in C/C++
- atexit() function in C/C++
- iswxdigit() function in C/C++
- towlower() function in C/C++
- strrev() function in C
- iswspace() function in C/C++
- exp2() function in C++ STL
- feupdateenv() function in C++
- raise() function in C++
- towupper() function in C/C++
- wcstoll() function in C/C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



