Merge pull request #167 from nathanblaney/patch-1

Added reverse to utility.py
This commit is contained in:
Luke Rogers 2013-10-05 19:19:49 -07:00
commit 2e20487676
1 changed files with 7 additions and 0 deletions

View File

@ -109,6 +109,13 @@ def length(inp):
"""length <string> -- gets the length of <string>"""
return "The length of that string is {} characters.".format(len(inp))
# reverse
@hook.command
def reverse(inp):
"""Enter a string and the bot will reverse it and print it out."""
return "You say %s, I say %s" % (inp, inp[::-1])
# hashing
@hook.command