| 20 | IndexType to_original_index(IndexType cur_index) const { return !mapping.empty() ? mapping[cur_index] : cur_index; } |
| 21 | |
| 22 | IndexType from_original_index(IndexType cur_index) const { |
| 23 | return !mapping.empty() ? static_cast<IndexType>(std::lower_bound(mapping.begin(), mapping.end(), cur_index) - mapping.begin()) : cur_index; |
| 24 | } |
| 25 | |
| 26 | IndexType original_length() const { return !mapping.empty() ? mapping.back() : static_cast<IndexType>(str.size()); } |
| 27 |
no test coverage detected