convert uppercase to lowercase in c++ string code example
Example 1: convert characters to lowercase c++
str[i] = tolower(str[i]);
Example 2: convert all strings in vector to lowercase or uppercase c++
for(std::string &s : stringVector){
std::transform(s.begin(), s.end(), s.begin(),
[](char c){ return std::toupper(c); }); // for lowercase change "toupper" -> "tolower"
}