| 29 | |
| 30 | template <typename T, typename U> |
| 31 | static bool IsIntersect(const T& a, const U& b) noexcept { |
| 32 | if (b.data() < a.data()) { |
| 33 | return IsIntersect(b, a); |
| 34 | } |
| 35 | |
| 36 | return !a.empty() && !b.empty() && |
| 37 | ((a.data() <= b.data() && b.data() < a.data() + a.size()) || |
| 38 | (a.data() < b.data() + b.size() && b.data() + b.size() <= a.data() + a.size())); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Replaces all occurences of substring @c from in string @c s to string @c to. |
no test coverage detected