MCPcopy Create free account
hub / github.com/KDE/kdevelop / leftOfNeedleOrEntireView

Function leftOfNeedleOrEntireView

kdevplatform/util/stringviewhelpers.h:51–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 */
50template<typename Needle>
51QStringView 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

Callers 3

parseNextLineMethod · 0.85
parseGitBlameOutputMethod · 0.85
completionInvokedMethod · 0.85

Calls 2

indexOfMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected