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 Aug. 8, 2023, 9:06 a.m.