powered by
A wrapper function to make strwrap() return a character vector of the same length as the input vector; each element of the output vector is a string formed by concatenating wrapped strings by \n.
strwrap()
\n
str_wrap(...)
A character vector.
Arguments passed to strwrap().
x = sample(c(letters, " "), 200, TRUE, c(rep(0.5/26, 26), 0.5)) x = rep(paste(x, collapse = ""), 2) strwrap(x, width = 30) xfun::str_wrap(x, width = 30) # same length as x
Run the code above in your browser using DataLab