#unicode #unicode-text #string #unicode-width #word

unicode-ellipsis

A crate to truncate Unicode strings to a certain width, automatically adding an ellipsis if the string is too long

7 releases

0.2.0 May 26, 2024
0.1.4 May 8, 2024
0.0.0 May 8, 2024

#1233 in Text processing

Download history 1252/week @ 2024-08-16 1008/week @ 2024-08-23 1026/week @ 2024-08-30 1542/week @ 2024-09-06 1143/week @ 2024-09-13 1120/week @ 2024-09-20 890/week @ 2024-09-27 940/week @ 2024-10-04 1108/week @ 2024-10-11 1046/week @ 2024-10-18 885/week @ 2024-10-25 1154/week @ 2024-11-01 1187/week @ 2024-11-08 1243/week @ 2024-11-15 1249/week @ 2024-11-22 1465/week @ 2024-11-29

5,322 downloads per month
Used in bottom

MIT/Apache

32KB
577 lines

unicode-ellipsis

crates.io link Documentation

A crate to truncate Unicode strings to a certain width, automatically adding an ellipsis if the string is too long. Also has some helper functions around Unicode grapheme and string width.

Licensing

Dual-licensed under Apache 2.0 and MIT.


lib.rs:

A crate to truncate Unicode strings to a certain width, automatically adding an ellipsis if the string is too long.

Additionally contains some helper functions regarding string and grapheme width.

Dependencies

~1.5MB
~23K SLoC