R/trim.r

#' This is a function remove space characters from the head and tail of a string
#' @param 
#' @keywords string
#' @export
#' @examples
#' trim(' cats haunt me ')

trim <- function (j) {
    gsub("^\\s+|\\s+$", "", j)
}
gbearden/stellar documentation built on May 12, 2019, 8:46 a.m.