Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
basic_static_string::compare (3 of 9 overloads)

Compare the string with another.

Synopsis
template<
    std::size_t M>
BOOST_STATIC_STRING_CPP14_CONSTEXPR int
compare(
    size_type pos1,
    size_type count1,
    const basic_static_string< M, CharT, Traits >& s,
    size_type pos2,
    size_type count2 = npos) const;
Description

Compares a [pos1, pos1+count1) substring of this string to a substring [pos2, pos2+count2) of s. If count1 > size() - pos1 the first substring is [pos1, size()). Likewise, if count2 > s.size() - pos2 the second substring is [pos2, s.size()).


PrevUpHomeNext