Registry / utility / unicode-width

unicode-width

JSON →
library0.2.2rscratesunverified

Determine displayed width of char and str types according to Unicode Standard Annex #11 rules.

# Cargo.toml [dependencies] unicode-width = "0.2.2"
INSTALL
IMPORT
SIG · UNICODE-WIDTH
U
unicode-width
utilityrustv0.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

UnicodeWidthStr
use unicode_width::UnicodeWidthStr;

Calculate the display width of a string.

use unicode_width::UnicodeWidthStr; fn main() { let width = "Hello".width(); println!("Width: {}", width); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
unicode-width — cargo add unicode-width · libregistry