add proper docstring to string_camelcase. refs #58

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40821
This commit is contained in:
Daniel Grana 2009-02-05 12:20:25 +00:00
parent 751a844e36
commit bf87fb8455
1 changed files with 8 additions and 0 deletions

View File

@ -157,4 +157,12 @@ def items_to_csv(file, items, delimiter=';', headers=None):
CAMELCASE_INVALID_CHARS = re.compile('[^a-zA-Z]')
def string_camelcase(string):
""" Convert a word to it CamelCase version
>>> string_camelcase('lost-pound')
LostPound
>>> string_camelcase('missing_images')
MissingImages
"""
return CAMELCASE_INVALID_CHARS.sub('', string.title())