Answers for "convert all strings in vector to lowercase or uppercase c++"

C++
0

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" 
}
Posted by: Guest on September-16-2020

Code answers related to "convert all strings in vector to lowercase or uppercase c++"

Browse Popular Code Answers by Language