R/str_surround.R

Defines functions str_surround

Documented in str_surround

#' Surround a string with another
#'
#' @param x A character vector of strings to surround
#' @param string Another character
#'
#' @return A character vector
#'
#' @export

str_surround <- function(x, string = "") {

  x %>% str_prepend(string) %>% str_append(string)

}
rscherrer/ggfacet documentation built on May 7, 2021, 11:40 a.m.