Maybe again?

This commit is contained in:
Kepoor Hampond 2017-06-10 18:48:30 -07:00
parent fa64378c2b
commit e61036dc51

View file

@ -96,15 +96,16 @@ class ObjManip: # Object Manipulation
return False return False
def blank(string, downcase=True): def blank(string, downcase=True):
if downcase:
string = string.lower()
import re import re
regex = re.compile('[^a-zA-Z0-9\ ]') regex = re.compile('[^a-zA-Z0-9\ ]')
if sys.version_info == 2: if sys.version_info == 2:
string = regex.sub('', string.decode("utf8")) string = regex.sub('', string.decode("utf8"))
return ' '.join(string.decode().split())
else: else:
string = regex.sub('', string) string = regex.sub('', string)
if downcase: return ' '.join(string.split())
string = string.lower()
return ' '.join(string.decode().split())
def blank_include(this, includes_this): def blank_include(this, includes_this):
this = ObjManip.blank(this) this = ObjManip.blank(this)