Skip to main content

wrap

Function wrap 

Source
pub fn wrap(text: &str, width: usize) -> Vec<String>
Expand description

Wraps text to lines no wider than width columns (word-aware).

Words longer than width are hard-split. A width of zero yields the original text as a single line.