Debian Codegraph @

man/raw_string.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/data-structure.R
3 \name{raw_string}
4 \alias{raw_string}
5 \alias{print.xfun_raw_string}
6 \title{Print a character vector in its raw form}
7 \usage{
8 raw_string(x, ...)
9
10 \method{print}{xfun_raw_string}(x, ...)
11 }
12 \arguments{
13 \item{x}{For \code{raw_string()}, a character vector. For the print method,
14 the \code{raw_string()} object.}
15
16 \item{...}{Other arguments (currently ignored).}
17 }
18 \description{
19 The function \code{raw_string()} assigns the class \code{xfun_raw_string} to
20 the character vector, and the corresponding printing function
21 \code{print.xfun_raw_string()} uses \code{cat(x, sep = '\\n')} to write the
22 character vector to the console, which will suppress the leading indices
23 (such as \verb{[1]}) and double quotes, and it may be easier to read the
24 characters in the raw form (especially when there are escape sequences).
25 }
26 \examples{
27 library(xfun)
28 raw_string(head(LETTERS))
29 raw_string(c("a \"b\"", "hello\tworld!"))
30 }