Skip to main content

builtin_strwrap

Function builtin_strwrap 

Source
fn builtin_strwrap(
    args: &[RValue],
    named: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Wrap character strings to a specified width.

Breaks long strings into lines of at most width characters. Supports first-line indentation (indent) and subsequent-line indentation (exdent).

@param x character vector to wrap @param width target line width (default: 0.9 * getOption(“width”)) @param indent indentation of first line (default: 0) @param exdent indentation of subsequent lines (default: 0) @param prefix prefix for each line (default: “”) @param simplify if TRUE return a character vector, if FALSE return a list @return character vector (or list) of wrapped strings @namespace base