unstd::toupper
by Remy Porter
in CodeSOD
on 2016-09-13
C++ is a language with a… checkered past. It’s grown, matured and changed over the decades, and modern C++ looks very little like the C++ of yesteryear. Standard libraries have grown and improved- these days, std
feels nearly as big and complicated as parts of Java’s class library.
One useful function is std::toupper
. Given a char
, it will turn that char
into an upper-case version, in a locale-aware fashion. What if you want to turn an entire string to upper-case?