boost::urls::grammar::string_view_base::compare :: Boost Libraries Documentation

# boost::urls::grammar::string_view_base::compare

Return the result of comparing to another string

## Synopses

Declared in `<boost/url/grammar/string_view_base.hpp>`

Return the result of comparing to another string

    constexpr
    int
    compare(core::string_view str) const noexcept;

» more...

Return the result of comparing to another string

    constexpr
    int
    compare(char const* s) const noexcept;

» more...

Return the result of comparing to another string

    constexpr
    int
    compare(
        size_type pos1,
        size_type n1,
        core::string_view str) const;

» more...

Return the result of comparing to another string

    constexpr
    int
    compare(
        size_type pos1,
        size_type n1,
        char const* s) const;

» more...

Return the result of comparing to another string

    constexpr
    int
    compare(
        size_type pos1,
        size_type n1,
        char const* s,
        size_type n2) const;

» more...

Return the result of comparing to another string

    constexpr
    int
    compare(
        size_type pos1,
        size_type n1,
        core::string_view str,
        size_type pos2,
        size_type n2) const;

» more...

## Return Value

The result of the comparison

## Parameters

Name | Description
str | The string to compare
s | The string to compare
pos1 | The position to start comparing from
n1 | The number of characters to compare
n2 | The number of characters to compare
pos2 | The position to start comparing from

Created with MrDocs