R/str_utils.R

Defines functions str_remove_ str_subset_

#' @description Base version of [stringr::str_subset] for internal use.
#' @noRd
str_subset_ <- function(x, pattern) {
  x[grepl(x = x, pattern = pattern)]
}

#' @description Base version of [stringr::str_subset] for internal use.
#' @noRd
str_remove_ <- function(x, pattern) {
  gsub(x = x, pattern = pattern, replacement = "")
}

Try the cloudfs package in your browser

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

cloudfs documentation built on May 29, 2024, 11:08 a.m.