These four functions are to speed up the most common comparisons: equality and inequality.
| 811 | |
| 812 | // These four functions are to speed up the most common comparisons: equality and inequality. |
| 813 | bool equals(const StringType& str) const |
| 814 | { |
| 815 | const size_type n = str.length(); |
| 816 | return (length() != n) ? false : (Comparator::compare(c_str(), str.c_str(), n) == 0); |
| 817 | } |
| 818 | bool different(const StringType& str) const |
| 819 | { |
| 820 | const size_type n = str.length(); |
no test coverage detected