On Wed, Feb 11, 2015 at 2:20 PM, Guido Seifert <warg...@gmx.de> wrote:
> > Minor OT, but I am too curious... do you have an example? > Are there really cases were turning lower case into upper case or > vice versa changes the length of a string? > Yes, and he already said such example, ß becomes SS > > Guido > > > > 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. > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development >
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development