Skip to main content

normalize_whitespace

Function normalize_whitespace 

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

Normalise all runs of whitespace in text to a single space.

Leading and trailing whitespace is also stripped.