1#' Quoting operators
2#'
3#' These functions make it easy to quote each individual element and are useful
4#' in conjunction with [glue_collapse()].
5#' @param x A character to quote.
6#' @name quoting
7#' @export
8#' @examples
9#' x <- 1:5
10#' glue('Values of x: {glue_collapse(backtick(x), sep = ", ", last = " and ")}')
11single_quote <- function(x) {
12  encodeString(x, quote = "'", na.encode = FALSE)
13}
14
15#' @rdname quoting
16#' @export
17double_quote <- function(x) {
18  encodeString(x, quote = '"', na.encode = FALSE)
19}
20
21#' @rdname quoting
22#' @export
23backtick <- function(x) {
24  encodeString(x, quote = "`", na.encode = FALSE)
25}
26