File: stri_unescape_unicode.Rd

package info (click to toggle)
r-cran-stringi 1.7.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 39,772 kB
  • sloc: cpp: 482,349; ansic: 51,900; perl: 471; makefile: 9; sh: 1
file content (54 lines) | stat: -rw-r--r-- 1,643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/escape.R
\name{stri_unescape_unicode}
\alias{stri_unescape_unicode}
\title{Un-escape All Escape Sequences}
\usage{
stri_unescape_unicode(str)
}
\arguments{
\item{str}{character vector}
}
\value{
Returns a character vector.
If an escape sequence is ill-formed,
result will be \code{NA} and a warning will be given.
}
\description{
Un-escapes all known escape sequences
}
\details{
Uses \pkg{ICU} facilities to un-escape Unicode character sequences.

The following ASCII standard escapes are recognized:
\code{\\a}, \code{\\b}, \code{\\t}, \code{\\n}, \code{\\v}, \code{\\?},
\code{\\e}, \code{\\f}, \code{\\r}, \code{\"}, \code{\'}, \code{\\\\}.

Moreover, the function understands the following ones:
\code{\\uXXXX} (4 hex digits),
\code{\\UXXXXXXXX} (8 hex digits),
\code{\\xXX} (1-2 hex digits),
\code{\\ooo} (1-3 octal digits),
\code{\\cX} (control-X; X is masked with 0x1F).
For \code{\\xXX} and \code{\\ooo}, beware of non-valid UTF-8 byte sequences.

Note that some versions of R on Windows cannot handle
characters defined with  {\\UXXXXXXXX}.
We are working on that.
}
\examples{
stri_unescape_unicode('a\\\\u0105!\\\\u0032\\\\n')

}
\seealso{
The official online manual of \pkg{stringi} at \url{https://stringi.gagolewski.com/}

Gagolewski M., \pkg{stringi}: Fast and portable character string processing in R, \emph{Journal of Statistical Software} 103(2), 2022, 1-59, \doi{10.18637/jss.v103.i02}

Other escape: 
\code{\link{stri_escape_unicode}()}
}
\concept{escape}
\author{
\href{https://www.gagolewski.com/}{Marek Gagolewski} and other contributors
}