R/utils.R

Defines functions fast_str_squish

Documented in fast_str_squish

#' Very slightly faster version of stringr's str_squish()
#' @param string A string to squish (remove whitespace)
#' @keywords internal
fast_str_squish <- function(string) {
  stringi::stri_trim_both(gsub("\\s+", " ", string, perl = TRUE))
}

Try the readabs package in your browser

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

readabs documentation built on Dec. 17, 2021, 1:07 a.m.