db_path_sanitize function

Switch illegal characters for legal ones

Switch illegal characters for legal ones

Inspired by the fs package's path_sanitize function

db_path_sanitize(filename, replacement = "_")

Arguments

  • filename: the file or folder to sanitize
  • replacement: what should the illegal character(s) be replaced with? (default: "_")

Returns

the sanitized string

Examples

db_path_sanitize('this:string"has?issues')
  • Maintainer: Jonathan Keane
  • License: Apache License (>= 2.0)
  • Last published: 2024-04-09