powered by
Duplicates each str(e1) string times(e2) times and concatenates the results.
str
e1
times
e2
stri_dup(str, times)e1 %s*% e2e1 %stri*% e2
e1 %s*% e2
e1 %stri*% e2
Returns a character vector.
a character vector of strings to be duplicated
an integer vector with the numbers of times to duplicate each string
Marek Gagolewski and other contributors
Vectorized over all arguments.
e1 %s*% e2 and e1 %stri*% e2 are synonyms for stri_dup(e1, e2)
stri_dup(e1, e2)
The official online manual of stringi at https://stringi.gagolewski.com/
Other join: %s+%(), stri_flatten(), stri_join_list(), stri_join()
%s+%()
stri_flatten()
stri_join_list()
stri_join()
stri_dup('a', 1:5) stri_dup(c('a', NA, 'ba'), 4) stri_dup(c('abc', 'pqrst'), c(4, 2)) "a" %s*% 5
Run the code above in your browser using DataLab