[#boost-urls-grammar-string_view_base-compare-0c] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::xref:boost/urls/grammar/string_view_base.adoc[string_view_base]::compare :relfileprefix: ../../../../ :mrdocs: Return the result of comparing to another string == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/string_view_base.hpp#L490[boost/url/grammar/string_view_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr int 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` == Return Value The result of the comparison == Parameters [cols=2] |=== | Name | Description | *pos1* | The position to start comparing from | *n1* | The number of characters to compare | *s* | The string to compare | *n2* | The number of characters to compare |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#