[dev] Re: [cvs] commit: turba/lib List.php

Jan Schneider jan at horde.org
Sun Sep 28 04:22:55 PDT 2003


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> chuck       2003/09/26 18:38:25 PDT
>
>   Modified files:
>     lib                  List.php
>   Log:
>   I don't know if this has i18n implications, but strnatcasecmp is a
>   *much* more intuitive sorting function for pretty much everything - it
>   does natural order sorting for numbers (2 comes before 10), and is
>   case insensitive - seems to match the expectations people would have
>   of an addressbook better to me.

It has a lot of i18n implications, thus the comment before the old code.
strcoll is also case insensitive if you don't use the C locale. So the only
advantage left for strnatcasecmp is the natural sorting order for numbers
while losing the naturaly sorting order for all non-ascii chars. That
doesn't weigh IMO.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list