Skip to content

Instantly share code, notes, and snippets.

@jillesme
Created November 12, 2015 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jillesme/b77cc312e76fe2595f5f to your computer and use it in GitHub Desktop.
Save jillesme/b77cc312e76fe2595f5f to your computer and use it in GitHub Desktop.
def kebab_to_camel(string):
splitted = string.split('-')
result = [part.title() for part in splitted[1:]]
result.insert(0, splitted[0].lower())
return ''.join(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment