Skip to content

Instantly share code, notes, and snippets.

@marekswiecznik
marekswiecznik / migrate_localizable_strings_to_swiftgen.py
Created October 6, 2022 10:37
Migrate NSLocalizedString occurences in Swift code to SwiftGen
#!/usr/bin/env python3
import os
import re
import string
def to_camel_case(snake_str):
components = snake_str.split('_')
return components[0] + ''.join(string.capwords(x) for x in components[1:])