Case-insensitive string comparison

Neil Hodgson nhodgson at bigpond.net.au
Mon Apr 14 15:54:38 EDT 2003


Avner Ben:

>     I have tried the lower them all approach, but at the rate of
processing
> I need, it has turned out to reduce application speed by a factor of four.
> What I need is an efficient built-in way of doing this.

   Could you explain your processing? I have found the case-standardization
and then compare much faster than in-place case-insensitive comparison when
for example, matching words in a program against a list of case-insensitive
keywords. Or when sorting.

   Neil






More information about the Python-list mailing list