convert all letters to lowercase c++ code example
Example 1: convert characters to lowercase c++
str[i] = tolower(str[i]);
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;
}