On Wednesday 11 February 2015 10:32:22 Mark Gaiser wrote:
> > Have you tried to uppercase or lowercase a string using only the Standard
> > Library?
> 
> std::string s("hello");
> std::transform(s.begin(), s.end(), s.begin(), ::toupper);
> 
> and
> std::transform(s.begin(), s.end(), s.begin(), ::tolower);
> 
> Not sure about the performance though

That's flawed by construction. Uppercasing and lowercasing are string 
operations, since it can change length, *especially* if you do it in UTF-8.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to