| 77 | } |
| 78 | |
| 79 | StringView::Char StringView::at(size_t index) const { |
| 80 | auto it = begin(); |
| 81 | auto itEnd = end(); |
| 82 | for (size_t i = 0; i < index; ++i) { |
| 83 | ++it; |
| 84 | if (it == itEnd) |
| 85 | throw OutOfRangeException(strf("Out of range in StringView::at({})", i)); |
| 86 | } |
| 87 | return *it; |
| 88 | } |
| 89 | |
| 90 | bool StringView::endsWith(StringView end, CaseSensitivity cs) const { |
| 91 | auto endsize = end.size(); |
no test coverage detected