#string #unicode #word #text

unicode-ellipsis

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

7 releases

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

#521 in Text processing

Download history 509/week @ 2024-05-06 323/week @ 2024-05-13 214/week @ 2024-05-20

1,046 downloads per month

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

~630KB