Answers for "how to convert a string to uppercase in c++ using upper"

C++
4

convert all characters in string to uppercase c++

transform(str.begin(), str.end(), str.begin(), ::toupper);
Posted by: Guest on September-14-2020
4

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 "how to convert a string to uppercase in c++ using upper"

Browse Popular Code Answers by Language