Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread papa
al Message- From: Martin Sebor Sent: Wednesday, July 1, 2015 11:17 AM To: p...@arbolone.ca ; Riot ; mingw-w64-public@lists.sourceforge.net Cc: gcc-help Mailing List Subject: Re: [Mingw-w64-public] toUpper() On 07/01/2015 06:02 AM, p...@arbolone.ca wrote: > std::wstring source(L"Hello World

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread papa
This one is way cooler http://www.bing.com/search?q=toupper&src=IE-TopResult&FORM=IETR02&conversationid= From: Alexandre Pereira Nunes Sent: Tuesday, June 30, 2015 7:37 PM To: mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] toUpper() [cut] This may also he

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread Martin Sebor
day, June 30, 2015 10:01 PM To: Riot ; mingw-w64-public@lists.sourceforge.net Cc: gcc-help Mailing List Subject: Re: [Mingw-w64-public] toUpper() On 06/30/2015 05:24 PM, Riot wrote: #include #include std::string str = "Hello World"; std::transform(str.begin(), str.end

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread Martin Sebor
On 06/30/2015 05:24 PM, Riot wrote: > #include > #include > > std::string str = "Hello World"; > std::transform(str.begin(), str.end(), str.begin(), std::toupper); Please note this code is subtly incorrect for two reasons. There are two overloads of std::toupper: 1) int toup

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread papa
wever, any suggestions would be very much appreciated -Original Message- From: Martin Sebor Sent: Tuesday, June 30, 2015 10:01 PM To: Riot ; mingw-w64-public@lists.sourceforge.net Cc: gcc-help Mailing List Subject: Re: [Mingw-w64-public] toUpper() On 06/30/2015 05:24 PM, Riot wrote: >

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread Jonathan Wakely
On 30 June 2015 at 23:58, 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

Re: [Mingw-w64-public] toUpper()

2015-06-30 Thread Alexandre Pereira Nunes
> > [cut] > This may also help in future: http://lmgtfy.com/?q=c%2B%2B+toupper > > ROTFL! I didn't know that one. As for std::toupper, IIRC there's an override which takes a locale argument. But I'm not sure mingw-w64 support locales other than C in that case. Last time I checked libstdc++ didn't

Re: [Mingw-w64-public] toUpper()

2015-06-30 Thread Riot
#include #include 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:5

[Mingw-w64-public] toUpper()

2015-06-30 Thread papa
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::