R/trim.R

#' trim.
#'
#' trim function
#'
#' @param x the vector to be trimmed
#' @return A vector
#' @example
#'   a <- "  baesg  "
#'   trim(a)
#'@export

trim <- function (x) gsub("^\\s+|\\s+$", "", x)
Sanggeun/g.function.bsg documentation built on May 15, 2020, 3:50 p.m.