#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

8 unstable releases (3 breaking)

new 0.3.0 Jan 7, 2025
0.2.0 May 26, 2024
0.1.4 May 8, 2024
0.0.0 May 8, 2024

#1543 in Text processing

Download history 1134/week @ 2024-09-17 1001/week @ 2024-09-24 898/week @ 2024-10-01 901/week @ 2024-10-08 1260/week @ 2024-10-15 867/week @ 2024-10-22 1107/week @ 2024-10-29 1119/week @ 2024-11-05 1218/week @ 2024-11-12 1177/week @ 2024-11-19 1704/week @ 2024-11-26 1318/week @ 2024-12-03 1071/week @ 2024-12-10 1070/week @ 2024-12-17 943/week @ 2024-12-24 773/week @ 2024-12-31

4,019 downloads per month
Used in bottom

MIT/Apache

43KB
1K SLoC

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

~2MB
~26K SLoC