| 49 | */ |
| 50 | template<typename Needle> |
| 51 | QStringView leftOfNeedleOrEntireView(QStringView view, Needle needle) |
| 52 | { |
| 53 | const auto index = view.indexOf(needle); |
| 54 | return index == -1 ? view : view.first(index); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Finds the last occurrence of @p needle in @p view and returns |
no test coverage detected