Fix camelCase again

This commit is contained in:
Joey Yakimowich-Payne 2020-09-09 05:04:07 -06:00
commit 84142253af

View file

@ -11,7 +11,6 @@ template camelCase(str: string): string =
else: else:
res.add(str[i]) res.add(str[i])
i += 1 i += 1
res[0] = res[0].toUpperAscii
res res
template lowerFirstLetter(str, rep: string): string = template lowerFirstLetter(str, rep: string): string =
@ -49,6 +48,7 @@ proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
elif sym.kind == nskType: elif sym.kind == nskType:
if sym.name.startsWith(rep): if sym.name.startsWith(rep):
sym.name = camelCase(removeBeginning(sym.name, rep)) sym.name = camelCase(removeBeginning(sym.name, rep))
sym.name[0] = sym.name[0].toUpperAscii
else: else:
sym.name = removeBeginning(sym.name, rep) sym.name = removeBeginning(sym.name, rep)