useregex::Regex;/// Sanitizes the given string of repeating whitespace and newlines, truncating
/// these into a single space character. This string may NOT be suitable for
/// use as a URI component, but may be presented to the user on a single
/// line of Gemtext.
pubfnclean(string:&str)-> String{let whitespace: Regex =Regex::new(r"\s+").unwrap();// Replace consecutive whitespace with a single space
return whitespace.replace_all(&string.trim(),"").to_string();}