usecrate::constants::WHITESPACE;/// 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.
pubfntruncate_spaces(string:&str)-> String{// Replace consecutive whitespace with a single space
WHITESPACE.replace_all(string.trim(),"").to_string()}