I realised the `if (!url) return "/"` guard code is actually now redundant. The code used to use a negative array index (ie. `url[-1]`) to find the last character but I replaced that with `endsWith("/")`. So the whole thing is empty-String-safe now. With this in mind I shortened it up a bit with some of your suggestions.

I am happy enough with the way `urlWithQueryString(...)` is.