String convenience functions
Usage
str_vector(x, qchar = c("single", "double"))
str_bracket(x)
str_parenth(x)
str_double_quote(x)
str_quote(x)
Examples
x <- "test"
cat(str_bracket(x), "\n")
#> [test]
cat(str_parenth(x), "\n")
#> (test)
cat(str_double_quote(x), "\n")
#> "test"
cat(str_quote(x), "\n")
#> 'test'
vec <- c("item1", "item2", "item3")
cat(str_vector(vec), "\n")
#> 'item1', 'item2', 'item3'
cat(str_vector(vec, qchar = "double"))
#> "item1", "item2", "item3"