[Development] toLower() vs. toCaseFolded()

Gian Maxera gmaxera at gmail.com
Wed Dec 9 11:17:15 CET 2015


Hello Marc,
I think the answer is into this Wikipedia page:
http://www.w3.org/International/wiki/Case_folding <http://www.w3.org/International/wiki/Case_folding>

As you can notice, case folding in languages different from English can be more difficult than just lowering the characters.
So, I suppose (it’s only my guess), that the toLower just lower all characters without taking into account the correct language rules while toCaseFolded take into account language.

Ciao,
Gianluca.


> On 9 Dec 2015, at 11:20, Marc Mutz <marc.mutz at kdab.com> wrote:
> 
> On Wednesday 09 December 2015 10:57:21 Florian Bruhin wrote:
>> * Marc Mutz <marc.mutz at kdab.com> [2015-12-09 11:54:54 +0100]:
>>> Hi,
>>> 
>>> http://doc.qt.io/qt-5/qstring.html#toCaseFolded is very vague on what
>>> case folding actually _is_ and how it's different from toLower().
>>> 
>>> Can someone please tell me the difference and why toCaseFolded() exists
>>> in the first place? Is it faster? Is it guaranteed to not make the
>>> string longer/shorter?
>> 
>> Maybe http://www.w3.org/International/wiki/Case_folding helps?
> 
> Not really. Neither does it patch our docs... :)
> 
> -- 
> Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
> KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
> Tel: +49-30-521325470
> KDAB - The Qt Experts
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20151209/44dfe344/attachment.html>


More information about the Development mailing list