stringi

Documentation

stri_rand_shuffle {stringi}R Documentation

Randomly Shuffle Code Points in Each String

Description

Generates a (pseudo)random permutation of code points in each string.

Usage

stri_rand_shuffle(str)

Arguments

str

character vector

Details

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

See also stri_reverse for a reverse permutation of code points.

Value

Returns a character vector.

See Also

Other random: stri_rand_lipsum, stri_rand_strings

Examples

stri_rand_shuffle(c("abcdefghi", "0123456789"))
# you can do better than this with stri_rand_strings:
stri_rand_shuffle(rep(stri_paste(letters, collapse=''), 10))


[Package stringi version 1.1.7 Index]