R/sanitize_path.R

Defines functions sanitize_path

Documented in sanitize_path

#' making paths uniform
#' @param path path to be sanitized
#' @return sanitized path
#' @keywords internal
sanitize_path <- function(path){
  path <- stringr::str_replace(    path, "^ *", "")
  path <- ifelse( !grepl("^/", path),  paste0("/", path), path)
  return(path)
}
ropenscilabs/robotstxt documentation built on Jan. 21, 2023, 7:19 p.m.