| 1434 | } |
| 1435 | |
| 1436 | int compare(const basic_string& other) const noexcept |
| 1437 | { |
| 1438 | auto len = min(size(), other.size()); |
| 1439 | auto comp = traits_type::compare(data_, other.data(), len); |
| 1440 | |
| 1441 | if (comp != 0) |
| 1442 | return comp; |
| 1443 | else if (size() == other.size()) |
| 1444 | return 0; |
| 1445 | else if (size() > other.size()) |
| 1446 | return 1; |
| 1447 | else |
| 1448 | return -1; |
| 1449 | } |
| 1450 | |
| 1451 | int compare(size_type pos, size_type n, const basic_string& other) const |
| 1452 | { |