pub fn ensure_trailing_slash(input: &str) -> String
Ensures that the URL or path ends with a trailing slash before any query or fragment.