Movatterモバイル変換


[0]ホーム

URL:


Docs.rs

UnicodeWidthStr

TraitUnicodeWidthStr 

Source
pub trait UnicodeWidthStr: Sealed {    // Required methods    fnwidth(&self) ->usize;    fnwidth_cjk(&self) ->usize;}
Expand description

Methods for determining displayed width of Unicode strings.

Required Methods§

Source

fnwidth(&self) ->usize

Returns the string’s displayed width in columns.

This function treats characters in the Ambiguous category accordingtoUnicode Standard Annex #11as 1 column wide. This is consistent with the recommendations fornon-CJK contexts, or when the context cannot be reliably determined.

Source

fnwidth_cjk(&self) ->usize

Returns the string’s displayed width in columns.

This function treats characters in the Ambiguous category accordingtoUnicode Standard Annex #11as 2 column wide. This is consistent with the recommendations forCJK contexts.

Implementations on Foreign Types§

Source§

implUnicodeWidthStr forstr

Implementors§


[8]ページ先頭

©2009-2025 Movatter.jp