unicode - How do I case fold a string in Python 2? -


python 3.3 adds casefold method str type, in 2.x don't have anything. what's best way work around this?

check out py2casefold.

>>> py2casefold import casefold >>> print casefold(u"tschüß") tschüss >>> casefold(u"ΣίσυφοςfiÆ") == casefold(u"ΣΊΣΥΦΟσfiæ") == u"σίσυφοσfiæ" true 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -