Skip to main content

preview

Function preview 

Source
pub fn preview(body: &str, chars: usize) -> String
Expand description

A stub’s preview: the first chars characters of body, cut back to the last word boundary when that keeps at least half of them, and marked … when anything was cut. Put on one line (one_line), so a preview stays on its line.