Locale-specific string comparasion

Y

Yuan HOng

Hi,

The locale modules privides a strcoll function that can perform locale
specific string comparision, and based on this, we can design custom
comparision function for the sorting.

However, this is quite cumbersome, for we have to derive custom
classes from from the string / unicode objects, and provide
comparision function to use locale.strcoll.

Is there a way to 'install' a system wide LC_COLLATE function, so that
string and unicode objects will automatically use the locale for their
comparision?

--
Hong Yuan

´ó¹Ü¼ÒÍøÉϽ¨²Ä³¬ÊÐ
×°ÐÞ×°ä꽨²Äһվʽ¹ºÎï
http://www.homemaster.cn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top