stri_escape_unicode | R Documentation |
Generates an ASCII string where all non-printable characters and non-ASCII characters are converted to escape sequences.
stri_escape_unicode(str)
str |
character vector |
For non-printable and certain special (well-known,
see also the R man page Quotes)
ASCII characters, the following
(also recognized in R) convention is used.
We get \a
, \b
, \t
, \n
, \v
,
\f
, \r
, \"
, \'
, \\
or either \uXXXX
(4 hex digits) or \UXXXXXXXX
(8 hex digits)
otherwise.
As usual in stringi, any input string is converted to Unicode before executing the escape process.
Returns a character vector.
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i02")}
Other escape:
stri_unescape_unicode()
stri_escape_unicode('a\u0105!')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.