Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #Convert #string #camel #case
ADD COMMENT
Topic
Name
5+3 =