Skip to main content

wordwrap

Function wordwrap 

Source
pub fn wordwrap(s: &str, limit: usize, breakpoints: &str) -> String
Expand description

Word-wrap s at breakpoints so visible lines fit within limit where possible.

Long words are not split; use wrap when oversized words should be hard-wrapped. ANSI escapes are preserved and do not contribute width.