string_replacements: Clean string with a given set of replacements.
Description
This function provides the functionality to clean a string
with a given set of replacements. This is e.g. useful to create
filenames or paths that are not allowed to contain spaces.
(String) All elements (names) of the input `replace_mapping` or
the default mapping are replaced by its values of the mapping.
Arguments
input
(string) The character string to be processed.
replace_mapping
(Optional, list, default = "default") The mapping
containing what should be replaced with what:
`replace_mapping <- list("replace_this" = "with_this")`
tolower
(boolean, default = FALSE) Should the result be lowercase?
toupper
(boolean, default = FALSE) Should the result be uppercase?