Guide API
Skip to main content

draw_str_ex

Function draw_str_ex 

Source
pub fn draw_str_ex(
    cells: &mut [Cell],
    indent: usize,
    text: &str,
    text_indent: i32,
    transform: impl FnMut(&mut Style),
) -> usize
Expand description

Copy text into cells starting at cell index indent, beginning from column text_indent of text, applying transform to the Style of each cell written. Returns the number of cells filled.

When text_indent lands in the middle of a double-width grapheme, a single space is emitted in its place.