#unicode #string #unicode-width #unicode-text #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

#712 in Text processing

Download history 233/week @ 2024-05-19 849/week @ 2024-05-26 784/week @ 2024-06-02 415/week @ 2024-06-09 728/week @ 2024-06-16 500/week @ 2024-06-23 509/week @ 2024-06-30 408/week @ 2024-07-07 522/week @ 2024-07-14 666/week @ 2024-07-21 1913/week @ 2024-07-28 1848/week @ 2024-08-04 1513/week @ 2024-08-11 1188/week @ 2024-08-18 902/week @ 2024-08-25 1089/week @ 2024-09-01

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

~1MB