Answers for "convert a string to uppercase c++"

3

string to upper c++

std::string data = "This is a sample string.";
// convert string to upper case
std::for_each(data.begin(), data.end(), [](char & c){
c = ::toupper(c);
});
Posted by: Guest on May-09-2020

Code answers related to "convert a string to uppercase c++"

Python Answers by Framework

Browse Popular Code Answers by Language