This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: toUpper()
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: papa at arbolone dot ca
- Cc: MinGW-64 Mailinglist <mingw-w64-public at lists dot sourceforge dot net>, gcc-help Mailing List <gcc-help at gcc dot gnu dot org>
- Date: Wed, 1 Jul 2015 11:09:27 +0100
- Subject: Re: toUpper()
- Authentication-results: sourceware.org; auth=none
- References: <76E10177FB2B41508BFB693CE76AF944 at ArbolOneLT>
On 30 June 2015 at 23:58, <papa@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(...)?
This is not a question about using GCC, it's about general C++
programming, so is inappropriate for the gcc-help list.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#std.strings.string
for some more information on the points Martin made.