======= COMPARISON OPERATIONS =======
| 152 | |
| 153 | // ======= COMPARISON OPERATIONS ======= |
| 154 | int compare(string_view other) const FL_NOEXCEPT { |
| 155 | fl::size min_len = (mSize < other.mSize) ? mSize : other.mSize; |
| 156 | for (fl::size i = 0; i < min_len; ++i) { |
| 157 | if (mData[i] < other.mData[i]) return -1; |
| 158 | if (mData[i] > other.mData[i]) return 1; |
| 159 | } |
| 160 | if (mSize < other.mSize) return -1; |
| 161 | if (mSize > other.mSize) return 1; |
| 162 | return 0; |
| 163 | } |
| 164 | |
| 165 | int compare(fl::size pos1, fl::size count1, string_view other) const FL_NOEXCEPT { |
| 166 | return substr(pos1, count1).compare(other); |
no test coverage detected