Skip to main content

compress_text

Function compress_text 

Source
pub fn compress_text(text: &str) -> String
Expand description

Semantic text reduction: strip decorative glyphs, then collapse runs of whitespace, then trim.

Order matters — decorative characters are removed before collapsing whitespace so that a glyph surrounded by spaces (e.g. "Click ▶ to play") does not leave a double space behind.