Skip to main content

ellipsize

Function ellipsize 

Source
fn ellipsize(
    style: &Style,
    line: &str,
    max_width: f32,
) -> Result<String, OgError>
Expand description

末行加省略号,放不下时从尾部逐字退回;同时去掉省略号前的空格与句读。