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)
}

Try the robotstxt package in your browser

Any scripts or data that you put into this service are public.

robotstxt documentation built on Sept. 4, 2020, 1:08 a.m.