Fixed start of each word and sentence case capitalization

This commit is contained in:
RemixDev 2020-04-25 18:46:19 +02:00
parent 9e67e8e93b
commit df79e3009f
1 changed files with 2 additions and 2 deletions

View File

@ -29,11 +29,11 @@ def changeCase(string, type):
string = string.split(" ")
res = []
for index, value in enumerate(string):
res.append(value[0].upper() + value[0:].lower())
res.append(value[0].upper() + value[1:].lower())
res = " ".join(res)
return res
elif type == "sentence":
res = string[0].upper() + string[0:].lower()
res = string[0].upper() + string[1:].lower()
return res
else:
return string