convert whole string to lowercase c++
#include <iostream>
#include <string>
#include <algorithm>
int main() {
std::string str = "Hello, World!";
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
std::cout << str;
return 0;
}