to lower c++ string code example
Example 1: tolower funciton in cpp
transform(s.begin(), s.end(), s.begin(), ::tolower);
Example 2: convert whole string to lowercase c++
#include<bits/stdc++.h>
using namespace std;
main() {
string s = "Viet Nam";
transform(s.begin(), s.end(), s.begin(), ::tolower); //lowercase
cout << s << endl;
}