Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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);
});
 
PREVIOUS NEXT
Tagged: #string #upper
ADD COMMENT
Topic
Name
1+7 =