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 grapheme g. This takes into account some things like joiners when calculating width.
  • Returns the width of a str s. This takes into account some things like joiners when calculating width.
  • Truncates a string to the specified width with an ellipsis character.