[#boost-urls-url_view_base-compare] = xref:boost/urls/url_view_base/compare.adoc[boost::urls::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#L2428[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 * https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[] == Return Value ‐1 if `*this < other`, 0 if `this == other`, and 1 if `this > other`. == Parameters [cols=2] |=== | Name | Description | *other* | The url to compare |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#