Crate unicode_ellipsis
source ·Expand description
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.
Functions§
- Returns the width of a single grapheme
g
. This takes into account some things like joiners when calculating width. - Truncates a string to the specified width with a trailing ellipsis character.
- Truncates a string to the specified width with a leading ellipsis character.