I am using one vector of strings and the strings are not in lower case. I want them to covert to lower case.
For converting string to lower case, I am using following method.
std::transform(strCmdLower.begin(), strCmdLower.end(), strCmdLower.begin(), ::tolower);
I can iterate vector and convert each string but I would like to know is there any library functions available for this purpose like above. Copying to new vector also fine.
std::vector<std::string> v1;
v1.push_back("ABC");
v1.push_back("DCE");
std::vector<std::string> v2(v1.begin(), v1.end());