pesterchum/quirks/defaults.py

30 lines
354 B
Python
Raw Normal View History

2011-06-07 11:48:35 -04:00
import random
2011-06-07 11:48:35 -04:00
def upperrep(text):
return text.upper()
2011-06-07 11:48:35 -04:00
upperrep.command = "upper"
2011-06-07 11:48:35 -04:00
def lowerrep(text):
return text.lower()
2011-06-07 11:48:35 -04:00
lowerrep.command = "lower"
2011-06-07 11:48:35 -04:00
def scramblerep(text):
return "".join(random.sample(text, len(text)))
2011-06-07 11:48:35 -04:00
scramblerep.command = "scramble"
2011-06-07 11:48:35 -04:00
def reverserep(text):
return text[::-1]
2011-06-07 11:48:35 -04:00
reverserep.command = "reverse"