Exemplo n.º 1
0
 /*!
  * Lexicographically compares the argument string to this string
  *
  * \param that Comparand
  * \return Zero if the comparand equals this string, a negative value if this string is less than the comparand,
  *         a positive value if this string is greater than the comparand.
  */
 int compare(this_type const& that) const
 {
     return compare(0, m_Len, that.c_str(), that.size());
 }
Exemplo n.º 2
0
 /*!
  * Lexicographically compares the argument string literal to a part of this string
  *
  * \pre <tt>pos <= size()</tt>
  * \param pos Starting position within this string to perform comparison to
  * \param n Length of the substring of this string to perform comparison to
  * \param that Comparand
  * \return Zero if the comparand equals this string, a negative value if this string is less than the comparand,
  *         a positive value if this string is greater than the comparand.
  *
  * \b Throws: An <tt>std::exception</tt>-based exception if \a pos is out of range.
  */
 int compare(size_type pos, size_type n, this_type const& that) const
 {
     return compare(pos, n, that.c_str(), that.size());
 }