开发者

Third-party titlecase method in Python

The standard string title() method in Python is pretty naive and doesn't correctly handle converting even fairly simple words and phrases to title case (hyphenated words, phrases with quotes, phrases with prepositions, etc.).

In Googling around, I found a few solutions in different l开发者_开发知识库anguages to this problem. Can anyone recommend a good implementation of this in Python?


Found this via Google: http://muffinresearch.co.uk/archives/2008/05/27/titlecasepy-titlecase-in-python/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜