Answers for "inbuilt function to change to lowercase in c++"

C++
0

converting a string to lowercase inbuld function in cpp

#include <iostream>
#include <algorithm>
using namespace std;

int main() {
   string my_str = "Hello WORLD";

   cout << "Main string: " << my_str << endl;
   transform(my_str.begin(), my_str.end(), my_str.begin(), ::tolower);

   cout << "Converted String: " << my_str;
}
Posted by: Guest on April-08-2021

Code answers related to "inbuilt function to change to lowercase in c++"

Browse Popular Code Answers by Language