pub fn normalize(text: &str) -> StringExpand description
Normalize whitespace in text.
- Trims leading/trailing whitespace
- Collapses multiple whitespace characters to single space
ยงExample
use html_cleaning::text;
assert_eq!(text::normalize(" hello world "), "hello world");