pub fn normalize_whitespace(text: &str) -> StringExpand description
Normalize whitespace by collapsing consecutive spaces and tabs.
Multiple spaces and tabs are replaced with a single space. Newlines are preserved. Unicode spaces are normalized to ASCII spaces.
§Arguments
text- The text to normalize
§Returns
Normalized text with collapsed spaces/tabs but preserved newlines