Remove code duplication in macros/templates in dash-to-camel-name