Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stri_escape_unicode

Escape Unicode Code Points


Description

Escapes all Unicode (not ASCII-printable) code points.

Usage

stri_escape_unicode(str)

Arguments

str

character vector

Details

For non-printable and certain special (well-known, see also 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, any input string is converted to Unicode before executing the escape process.

Value

Returns a character vector.

See Also

Other escape: stri_unescape_unicode()

Examples

stri_escape_unicode('a\u0105!')

stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.