Skip to contents

Reverse Elements of a chars Object

Usage

# S3 method for class 'chars'
rev(x)

Arguments

x

a chars object

Value

a chars object with the elements reversed.

Examples

rev(chars("racecar"))
#> [1] "racecar"

rev(chars("alphabet"))
#> [1] "tebahpla"