Re: KDE human sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 17, 2007 at 01:07:02PM +0000, Colin J Thomson - G6AVK wrote:
> Hi,
> On Saturday 17 March 2007 11:01:47 am Dotan Cohen wrote:
> > How can I get Konqueror and other KDE apps to sort numerical file
> > names in human-expected way? Such that file3.txt is sorted before
> > file20.txt
> 
> I think your refering to this:
> 
> http://bugs.kde.org/show_bug.cgi?id=87286

glibc for this has strverscmp(3) function, but that's strcmp alternative,
not strcoll (i.e. it doesn't take info account current locale).
strverscmp is used e.g. by ls -v.
rpm has another function, rpmvercmp which behaves little bit differently.
Guess you'd want something like a mixture of strcoll and strverscmp for KDE
for "natural" sorting, though I believe various people will have different
ideas of what actually "natural" sorting means.

	Jakub


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux