snakecase icon indicating copy to clipboard operation
snakecase copied to clipboard

(possibly) allow for completely user defined parsing

Open Tazinho opened this issue 7 years ago • 2 comments

It should be possible to add user defined parsing functionality.

To not break the existing parsig_option modus via integers, there could be an alternative via usage of named character vectors. These names and values could form pairs of regular expression patterns and replacements which would be chained and iteratively applied to the string. To enable this, a chain of str_replace_all calls should be wrapped into its own function via a base:::Reduce() call or some while/for conditional.

Tazinho avatar Feb 17 '19 22:02 Tazinho

Additionally it should be possible to combine these steps, i.e. providing a vector parsing_option = c("" = "", 1)`, which replaces all ticks first and afterwards applies the default parsing optionality.

Tazinho avatar Feb 17 '19 22:02 Tazinho

hm maybe this is out of scope. any advanced use might be able to write a sequence of gsubs by himself

Tazinho avatar May 25 '19 02:05 Tazinho