Convert a string to a safe filename
strToFilename(str, ext = NULL)
| str | The string to convert. |
|---|---|
| ext | Optionally, an extension to append. |
The string, processed to remove potentially problematic characters.
strToFilename("this contains: illegal characters, spaces, et cetera."); #> [1] "this-contains--illegal-characters--spaces--et-cetera"