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
147 stars 9 forks source link

abbreviations: let the user define how the abbreviations are converted #168

Closed Tazinho closed 5 years ago

Tazinho commented 5 years ago

i.e. the parsing should be case insensitive, but the replacement should match the exact spelling in the specification of the abbreviation by the user. I.e. the following should work:

to_upper_camel_case("customerID, abbreviations = "ID")
[1] "CustomerID"
to_upper_camel_case("customerID, abbreviations = "Id")
[1] "CustomerId"
Tazinho commented 5 years ago

Should only be possible for lower, upper, title, and mixed case

Tazinho commented 5 years ago

Implement via direct vectorization (subsetting) and replacement assignment instead of ifelse()

Tazinho commented 5 years ago

...solved via lookupds inside of the ifelse :)