This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
CloudBot/plugins/util/formatting.py
2012-04-21 16:03:08 +12:00

9 lines
250 B
Python
Executable file

""" formatting.py - handy functions for formatting text """
def capitalize_first(line):
""" capitalises the first letter of words
(keeps other letters intact)
"""
return ' '.join([s[0].upper() + s[1:] for s in line.split(' ')])