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
sto at mostmax_charsUnicode characters, appending “…” if shortened. - truncate_
to_ fit - Truncate
sto fit withinavailable_pxpixels at the given averagepx_per_charrate, appending “…” when the string is shortened.