MCPcopy Create free account
hub / github.com/comaps/comaps / Replace

Method Replace

libs/base/string_utils.hpp:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 5

NativeTimetableSetFunction · 0.80
UNIT_TESTFunction · 0.80
CommitMethod · 0.80
MakeTimeTableSetFunction · 0.80

Calls 2

insertFunction · 0.85
eraseFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.64