Substring operations
| 140 | |
| 141 | // Substring operations |
| 142 | string_view substr(fl::size pos = 0, fl::size count = npos) const FL_NOEXCEPT { |
| 143 | if (pos >= mSize) { |
| 144 | return string_view(); |
| 145 | } |
| 146 | fl::size actual_count = count; |
| 147 | if (actual_count == npos || pos + actual_count > mSize) { |
| 148 | actual_count = mSize - pos; |
| 149 | } |
| 150 | return string_view(mData + pos, actual_count); |
| 151 | } |
| 152 | |
| 153 | // ======= COMPARISON OPERATIONS ======= |
| 154 | int compare(string_view other) const FL_NOEXCEPT { |