#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

#1172 in Text processing

Download history 642/week @ 2024-07-20 1771/week @ 2024-07-27 1963/week @ 2024-08-03 1502/week @ 2024-08-10 1203/week @ 2024-08-17 955/week @ 2024-08-24 1153/week @ 2024-08-31 1476/week @ 2024-09-07 1142/week @ 2024-09-14 1108/week @ 2024-09-21 866/week @ 2024-09-28 922/week @ 2024-10-05 1152/week @ 2024-10-12 998/week @ 2024-10-19 1001/week @ 2024-10-26 1098/week @ 2024-11-02

4,437 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