Tazinho / snakecase

🐍🐍🐍 A systematic approach to parse strings and automate the conversion to snake_case, UpperCamelCase or any other case.
https://tazinho.github.io/snakecase/
GNU General Public License v3.0
146 stars 9 forks source link

Feature request: Select case for abbreviations #199

Open retodomax opened 1 month ago

retodomax commented 1 month ago

I would find it useful if it would be possible to convert to snake case but keep abbreviations capital letters, e.g. an additional argument which determines the capitalization of the abbreviation

snakecase::to_snake_case("Mass Flow CO2", abbreviations = "CO2")
#> mass_flow_co2
snakecase::to_snake_case("Mass Flow CO2", abbreviations = "CO2", abbreviation_case = "uppercase")
#> mass_flow_CO2

Thanks for the package!