![]() |
A String is a data structure in C++ language used to store a set of characters. It can be a single word or can contain a sentence and also can contain large text. In this article, we will learn how to convert string to lowercase. Example: Input: myString = "This Is Some StrIng" Output: myString = "this is some string" Convert std::string to Lower Case in C++To convert string to lowercase, we will use the function std::tolower() which converts any uppercase letter into a lowercase letter. If any lowercase letter is provided to it, the function keeps it as it is. Approach
C++ Program to Convert std::string to Lower CaseC++
Output
string: ABCDE String in lowercase: abcde Time complexity: O(N) |
Reffered: https://www.geeksforgeeks.org
C++ |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |