R/strClean.R

Defines functions strClean

Documented in strClean

#' A string function to remove whitespace
#'
#' This function will remove all whitespace before and after a string
#' @param str The string that should have it's whitespace removed
#' @export
#' @examples
#' strClean(str)

strClean <- function(str){
  str <- gsub("^\\s+|\\s+$", "", str)
  return(str)
}
lynuhs/LynuhsR documentation built on Oct. 15, 2020, 7:23 a.m.