[#boost-urls-url_view_base-compare] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url_view_base]::compare :relfileprefix: ../../../ :mrdocs: Return the result of comparing this with another url == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L2313[boost/url/url_view_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int compare(xref:boost/urls/url_view_base.adoc[url_view_base] const& other) const noexcept; ---- == Description This function compares two URLs according to Syntax‐Based comparison algorithm. === Complexity Linear in `min( u0.size(), u1.size() )` === Exception Safety Throws nothing. === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[6.2.2 Syntax‐Based Normalization (rfc3986)] Return the result of comparing this with another url This function compares two URLs according to Syntax‐Based comparison algorithm. === Complexity Linear in `min( u0.size(), u1.size() )` === Exception Safety Throws nothing. === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[6.2.2 Syntax‐Based Normalization (rfc3986)] == Return Value ‐1 if `*this < other`, 0 if `this == other`, and 1 if `this > other`. [.small]#Created with https://www.mrdocs.com[MrDocs]#