:relfileprefix: ../../../../
[#boost-urls-grammar-string_view_base-compare]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::xref:boost/urls/grammar/string_view_base.adoc[pass:[string_view_base]]::compare

  


Return the result of comparing to another string



=== Synopsis
  

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-02.adoc[pass:[compare]](core::string_view str) const noexcept;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-0a.adoc[pass:[compare]](
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] pos1,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n1,
    core::string_view str) const;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-0e.adoc[pass:[compare]](
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] pos1,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n1,
    core::string_view str,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] pos2,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n2) const;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-07.adoc[pass:[compare]](char const* s) const noexcept;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-0b.adoc[pass:[compare]](
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] pos1,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n1,
    char const* s) const;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
int
xref:boost/urls/grammar/string_view_base/compare-0c.adoc[pass:[compare]](
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] pos1,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n1,
    char const* s,
    xref:boost/urls/grammar/string_view_base/size_type.adoc[size_type] n2) const;
----
  
=== Description


See `core::string_view::compare`








