Skip to main content

fill

Function fill 

Source
pub fn fill(lines: &[&str], prefix: &Prefix, textwidth: usize) -> Vec<String>
Expand description

Reflow one already-identified paragraph into output lines.

Greedy fill: words are appended while the result still fits. A word that cannot fit on a line of its own overflows rather than being split — vim, Emacs fill-paragraph and Rewrap all agree, and it is what keeps a long URL in a comment intact.