R: Reverse Each String

stri_reverse {stringi} | R Documentation

## Reverse Each String

### Description

Reverses code points in every string.

### Usage

    stri_reverse(str)

### Arguments

`str` | character vector

### Details

Note that this operation may result in non-Unicode-normalized strings and may give strange output for bidirectional strings.

See also `stri_rand_shuffle` for a random permutation of code points.

### Value

Returns a character vector.

### Examples

    stri_reverse(c("123", "abc d e f"))
    stri_reverse("ZXY (\u0105\u0104123$^).")
    stri_reverse(stri_trans_nfd('\u0105')) == stri_trans_nfd('\u0105') # A, ogonek -> agonek, A

[Package stringi version 1.2.4 Index]