[#boost-urls-decode_view-compare-02]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/decode_view.adoc[decode&lowbar;view]::compare
:relfileprefix: ../../../
:mrdocs:

Return the result of comparing to another string

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/decode_view.hpp#Lundefined[boost&sol;url&sol;decode&lowbar;view&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
int
compare(core::string&lowbar;view other) const noexcept;
----

== Description

The length of the sequences to compare is the smaller of `size()` and `other&period;size()`&period;

The function compares the two strings as if by calling `char&lowbar;traits&lt;char&gt;&colon;&colon;compare(to&lowbar;string()&period;data(), v&period;data(), rlen)`&period; This means the comparison is performed with percent&hyphen;decoding applied to the current string&period;

== Return Value

Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence

== Parameters

[cols="1,4"]
|===
|Name|Description

| *other*
| string to compare
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
