Convert string to camel case code example
Example 1: Convert string to camel case
def to_camel_case(text):
if text == '':
return text
for i in text:
if i == '-' or i == '_':
text = text.replace(text[text.index(i):text.index(i)+2], text[text.index(i)+1].upper(), 1)
return text
Example 2: convert a camel case to string
convert camel case to string