How do I case fold a string in Python 2?

后端 未结 3 1009
情话喂你
情话喂你 2020-12-16 01:00

Python 3.3 adds the casefold method to the str type, but in 2.x I don\'t have anything. What\'s the best way to work around this?

3条回答
  •  半阙折子戏
    2020-12-16 01:36

    There is a thread here which covers some of the issues (but may not resolve all), you can judge whether it is suitable for what you need. If this is no good then there are some useful tips for implementing case folding on the W3C site here.

提交回复
热议问题