Skip to main content

Module text

Module text 

Source
Expand description

Text manipulation utilities shared across the crate.

Functions§

path_basename
Extract the filename (last component) from a /-separated path string.
truncate_str
Truncate s to at most max_chars Unicode characters, appending “…” if shortened.
truncate_to_fit
Truncate s to fit within available_px pixels at the given average px_per_char rate, appending “…” when the string is shortened.