From 27219d06986d539ff8ad67cbf2ffd11d18d6797a Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sun, 2 Jan 2022 14:14:57 +0100 Subject: [PATCH] fixed changeCase for strings with trailing whitespace --- deemix/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/utils/__init__.py b/deemix/utils/__init__.py index c9ff6d9..ff46ce6 100644 --- a/deemix/utils/__init__.py +++ b/deemix/utils/__init__.py @@ -35,9 +35,9 @@ def changeCase(txt, case_type): if case_type == "upper": return txt.upper() if case_type == "start": - txt = txt.split(" ") + txt = txt.strip().split(" ") for i, word in enumerate(txt): - if word[0] in ['(', '{', '[']: + if word[0] in ['(', '{', '[', "'", '"']: txt[i] = word[0] + word[1:].capitalize() else: txt[i] = word.capitalize()