Skip to main content

str_display_width

Function str_display_width 

Source
pub fn str_display_width(text: &str) -> usize
Expand description

Computes the Prettier column display width of a string (CJK and emoji wide characters count as 2).

§Arguments

  • &str - String slice to measure.

§Returns

  • usize - Total column display width.