stri_trans_char {stringi} | R Documentation |
Translates Unicode code points in each input string.
stri_trans_char(str, pattern, replacement)
str |
character vector |
pattern |
a single character string providing code points to be translated |
replacement |
a single character string giving translated code points |
Vectorized over str
and with respect to each code point
in pattern
and replacement
.
If pattern
and replacement
consist of a different number
of code points, then the extra code points in the longer of the two are ignored,
with a warning.
If code points in a given pattern
are not unique,
last corresponding replacement code point is used.
Returns a character vector.
Other transform: stri_trans_general
;
stri_trans_isnfc
,
stri_trans_isnfd
,
stri_trans_isnfkc
,
stri_trans_isnfkc_casefold
,
stri_trans_isnfkd
,
stri_trans_nfc
,
stri_trans_nfd
,
stri_trans_nfkc
,
stri_trans_nfkc_casefold
,
stri_trans_nfkd
;
stri_trans_list
;
stri_trans_tolower
,
stri_trans_totitle
,
stri_trans_toupper
stri_trans_char("id.123", ".", "_") stri_trans_char("babaab", "ab", "01")