| 60 | |
| 61 | template <class Iter> |
| 62 | void Replace(iterator first, iterator last, Iter first2, Iter last2) |
| 63 | { |
| 64 | auto it = first; |
| 65 | auto it2 = first2; |
| 66 | for (; it < last && it2 < last2; ++it, ++it2) |
| 67 | *it = *it2; |
| 68 | |
| 69 | if (it == last && it2 == last2) |
| 70 | return; |
| 71 | |
| 72 | if (it == last) |
| 73 | { |
| 74 | insert(it, it2, last2); |
| 75 | return; |
| 76 | } |
| 77 | |
| 78 | erase(it, last); |
| 79 | } |
| 80 | }; |
| 81 | |
| 82 | /// Performs full case folding for string to make it search-compatible according |