#include <algorithm> #include <string> std::string str = "Hello World"; std::transform(str.begin(), str.end(), str.begin(), std::toupper);
See also: http://www.cplusplus.com/reference/locale/toupper/ This may also help in future: http://lmgtfy.com/?q=c%2B%2B+toupper -Riot On 30 June 2015 at 23:58, <p...@arbolone.ca> wrote: > I would like to write a function to capitalize letters, say... > std::wstring toUpper(const std::wstring wstr){ > for ( auto it = wstr.begin(); it != wstr.end(); ++it){ > global_wapstr.append(std::towupper(&it)); > > } > } > > This doesn’t work, but doesn’t the standard already have something like > std::wstring::toUpper(...)? > > Thanks in advance > > > --- > This email has been checked for viruses by Avast antivirus software. > http://www.avast.com > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public