Learn R Programming

Kmisc (version 0.5.0)

str_rev: Reverse a Vector of Strings

Description

Reverses a vector of 'strings' (a character vector). Not safe for unicode (UTF-8) characters.

Usage

str_rev(x)

Arguments

x
a character vector.

Details

This function is written in C for fast execution; however, we do not handle non-ASCII characters. For a 'safe' version of str_rev that handles unicode characters, see str_rev2.

See Also

str_rev2

Examples

Run this code
x <- c("ABC", "DEF", "GHIJ")
str_rev(x)

Run the code above in your browser using DataLab