Merge pull request #770 from JulienPivard/fixadafilename

fix ada filename mixedcase with - object oriented
This commit is contained in:
Louis Pilfold 2016-08-05 12:59:51 +01:00 committed by GitHub
commit 02e9bf2b5c

View File

@ -5,7 +5,9 @@ global !p
def ada_case(word):
out = word[0].upper()
for i in range(1, len(word)):
if word[i - 1] == '_':
if word[i] == '-':
out = out + '.'
elif word[i - 1] == '_' or word[i - 1] == '-':
out = out + word[i].upper()
else:
out = out + word[i]