wrap string given a Truetype font
(string, character, or list)
string to be wrapped. If it is a vector or
a list, it will be looped as a list and returned with unlist(use.names = FALSE).
(numeric(1))
width, in characters, that the text should be wrapped to.
(font_spec)
a font_spec object specifying the font information to use for
calculating string widths and heights, as returned by font_spec().
(numeric(1))
number of minimum characters that remain
on either side when a word is split.
(string or NULL)
collapse character used to separate segments of words that
have been split and should be pasted together. This is usually done internally with "\n" to update
the wrapping along with other internal values.
(logical(1))
should breaking within a word be allowed? If, FALSE,
attempts to wrap a string to a width narrower than its widest word will result
in an error.
str, broken up into a word-wrapped vector