R/trim.R

#' Trims leading and trailing whitespaces
#'
#' This function trims leading and trailing whitespaces
#' @param x string to trim
#' @keywords trim leading trailing whitespaces
#' @export
#' @examples
#' df <- trim(" text containing leading and trailing whitespaces. ")
#' #text containing leading and trailing whitespaces.
trim <- function (x) gsub("^\\s+|\\s+$", "", x)

Try the mssqlR package in your browser

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

mssqlR documentation built on May 2, 2019, 10:16 a.m.