#' Remove Leading and Trailing Spaces
#'
#' @description Removes leading and trailing spaces from character strings.
#'
#' @param x Character string(s).
#'
#' @examples
#' x <- " Why hello there. "
#' print(deblank(x))
#'
#' @export deblank
deblank <- function(x){
x <- gsub("^[ \t\r\n]+", "", x, perl = TRUE)
x <- gsub("[ \t\r\n]+$", "", x, perl = TRUE)
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.