Guide API
Skip to main content

pad_cell

Function pad_cell 

Source
pub fn pad_cell(cell: &str, width: i32, align: Align) -> String
Expand description

Fit cell into exactly width display columns: pad with spaces per align, or cut the tail and mark the cut with … (width 1 → "…"). Measured in display columns, so wide characters are never split.