Skip to contents

Get a random string with prefix

Usage

random_string(prefix, size = 8)

Arguments

prefix

(character) any string. required.

size

(character) length of the random part (not including prefix)

Value

(character) a string with prefix at beginning

Examples

random_string("bucket")
#> bucketmwlefoud
replicate(10, random_string("bucket"))
#>  [1] "bucketfiexombk" "bucketkeulbfdp" "bucketbcvkgufi" "bucketvjubqtaf"
#>  [5] "bucketbsnaoreh" "bucketalspkcbj" "bucketcfdjagys" "bucketybhawgli"
#>  [9] "bucketjbfglnew" "bucketslqexmfa"