diff --git a/deemix/utils/__init__.py b/deemix/utils/__init__.py index 5e732fc..7bac728 100644 --- a/deemix/utils/__init__.py +++ b/deemix/utils/__init__.py @@ -34,7 +34,13 @@ def changeCase(txt, case_type): if case_type == "upper": return txt.upper() if case_type == "start": - return string.capwords(txt) + txt = txt.split(" ") + for i, word in enumerate(txt): + if word[0] in ['(', '{', '[']: + txt[i] = word[0] + word[1:].capitalize() + else: + txt[i] = word.capitalize() + return " ".join(txt) if case_type == "sentence": return txt.capitalize() return str