Skip to main content

wrap

Function wrap 

Source
fn wrap(
    style: &Style,
    text: &str,
    max_width: f32,
    max_lines: usize,
) -> Result<Vec<String>, OgError>
Expand description

按宽度折行,最多 max_lines 行;超出时末行以「…」收尾。