OrangeAlmondSoap OrangeAlmondSoap - 1 year ago 118
C++ Question

Convert a String In C++ To Upper Case

How could one convert a string to upper case. The examples I have found from googling only have to deal with chars.

Answer Source

Boost string algorithms:

#include <boost/algorithm/string.hpp>
#include <string>

std::string str = "Hello World";


std::string newstr = boost::to_upper_copy<std::string>("Hello World");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download