Created
November 19, 2015 23:03
-
-
Save masters3d/22f362ac6e98cee6d8ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fileinput | |
file = 'Directory' | |
filein = file + '.swift' | |
fileout = file + 'Edit' + '.swift' | |
def to_camel_case(snake_str): | |
components = snake_str.split('_') | |
return components[0] + "".join(x.capitalize() for x in components[1:]) | |
f1 = open(filein,'r') | |
f2 = open(fileout,'w') | |
for line in f1: | |
f2.write(to_camel_case(line)) | |
f1.close() | |
f2.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment