Checks if the second string overlaps in memory with the first string
| 173 | |
| 174 | // Checks if the second string overlaps in memory with the first string |
| 175 | inline bool is_overlapping(string_type const& str, const value_type* arg) |
| 176 | { |
| 177 | std::less< const value_type* > ptr_less{}; |
| 178 | return !(ptr_less(arg, str.data()) || ptr_less(str.data() + str.size(), arg)); |
| 179 | } |
| 180 | |
| 181 | } // unnamed namespace |
| 182 |