def upperCamelize(text: str):
lines = []
for l in text.split("\n"):
words = []
for w in l.split(" "):
w = "".join([i.title() for i in w.split("_")])
words.append(w)
lines.append(" ".join(words))
return "\n".join(lines)
text = "snake_case"
print(upperCamelize(text)) #SnakeCase
Last active
November 23, 2023 05:10
-
-
Save c2t-r/24262bc377b389b177ad836fb47a1107 to your computer and use it in GitHub Desktop.
convert text into upper camel case string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment