URL.opCmp

Compare two URLs.

I tried to make the comparison produce a sort order that seems natural, so it's not identical to sorting based on .toString(). For instance, username/password have lower priority than host. The scheme has higher priority than port but lower than host.

While the output of this is guaranteed to provide a total ordering, and I've attempted to make it human-friendly, it isn't guaranteed to be consistent between versions. The implementation and its results can change without a minor version increase.

struct URL
const
int
opCmp
(
const URL other
)

Meta