Instantiated member variants

compare

Template: std::char_traits<T>

Specializations:
  • char
  • wchar_t
  • char8_t
  • char16_t
  • char32_t

Compares the first count characters of the character strings s1 and s2. The comparison is done lexicographically.

# Declarations

static int compare( const char_type* s1, const char_type* s2,
std::size_t count );

(constexpr since C++17)

# Parameters

# Return value

Negative value if s1 is less than s2.