NOTE: Does not throw
| 203 | |
| 204 | // NOTE: Does not throw |
| 205 | basic_string_view substr(size_type pos, size_type n = npos) const noexcept |
| 206 | { |
| 207 | assert (pos < len_ && "Start position should be less than length of the view"); |
| 208 | assert (n == npos ? 1 : (n - pos) < len_ && |
| 209 | "Substring length asked for is more than the view length"); |
| 210 | |
| 211 | if (n == npos) n = len_; |
| 212 | |
| 213 | return basic_string_view{data_ + pos, n}; |
| 214 | } |
| 215 | |
| 216 | /// Comparison Member Functions |
| 217 | int compare(const basic_string_view& other) const noexcept |
no outgoing calls