Debian Codegraph @

man/str_wrap.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/string.R
3 \name{str_wrap}
4 \alias{str_wrap}
5 \title{Wrap character vectors}
6 \usage{
7 str_wrap(...)
8 }
9 \arguments{
10 \item{...}{Arguments passed to \code{\link[=strwrap]{strwrap()}}.}
11 }
12 \value{
13 A character vector.
14 }
15 \description{
16 A wrapper function to make \code{\link[=strwrap]{strwrap()}} return a character vector of the same
17 length as the input vector; each element of the output vector is a string
18 formed by concatenating wrapped strings by \verb{\\n}.
19 }
20 \examples{
21 x = sample(c(letters, " "), 200, TRUE, c(rep(0.5/26, 26), 0.5))
22 x = rep(paste(x, collapse = ""), 2)
23 strwrap(x, width = 30)
24 xfun::str_wrap(x, width = 30) # same length as x
25 }