converting a string to lowercase inbuld function in cpp

Solutions on MaxInterview for converting a string to lowercase inbuld function in cpp by the best coders in the world

showing results for - "converting a string to lowercase inbuld function in cpp"
Tomas
18 Jun 2019
1#include <iostream>
2#include <algorithm>
3using namespace std;
4
5int main() {
6   string my_str = "Hello WORLD";
7
8   cout << "Main string: " << my_str << endl;
9   transform(my_str.begin(), my_str.end(), my_str.begin(), ::tolower);
10
11   cout << "Converted String: " << my_str;
12}
similar questions