help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: case-insensitive string<


From: Ted Zlatanov
Subject: Re: case-insensitive string<
Date: Fri, 17 Apr 2009 12:01:15 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux)

On Fri, 17 Apr 2009 15:40:03 +0200 Nikolaj Schumacher <me@nschum.de> wrote: 

NS> What's the fastest way to sort a large list of strings in a
NS> case-insensitive order?

NS> Calling downcase on every string is rather expensive.  Does anyone know
NS> a better way?

Perhaps you can use `sort' with a predicate that uses `compare-strings'?
The latter function has a ignore-case parameter, and is implemented in C
so should be quite fast.

btw, BBDB has a string> macro, and subr.el has a string< alias to
string-lessp, which gets a bit confusing :).

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]