Skip to main content

str_width

Function str_width 

Source
pub fn str_width(s: &str) -> usize
Expand description

Calculate the display width of a string.

This is the sum of display widths of all characters in the string. Use this instead of .chars().count() when calculating visual layout.