Skip to content

Instantly share code, notes, and snippets.

@kennyledet
Created August 14, 2014 19:13
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 kennyledet/0d8b5f42b8398ea57a7b to your computer and use it in GitHub Desktop.
Save kennyledet/0d8b5f42b8398ea57a7b to your computer and use it in GitHub Desktop.
Convert an underscore_based_string into CamelCase
def underscore_to_camel_case(string):
return ''.join([chunk.capitalize() for chunk in string.split("_")])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment