Trait unicode_width::UnicodeWidthChar [−][src]
Methods for determining displayed width of Unicode characters.
Required methods
fn width(self) -> Option<usize>
[src]
Returns the character’s displayed width in columns, or None
if the
character is a control character other than '\x00'
.
This function treats characters in the Ambiguous category according to Unicode Standard Annex #11 as 1 column wide. This is consistent with the recommendations for non-CJK contexts, or when the context cannot be reliably determined.
fn width_cjk(self) -> Option<usize>
[src]
Returns the character’s displayed width in columns, or None
if the
character is a control character other than '\x00'
.
This function treats characters in the Ambiguous category according to Unicode Standard Annex #11 as 2 columns wide. This is consistent with the recommendations for CJK contexts.