This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: toUpper()


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]