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

Function matchesAtOffset

kdevplatform/util/stringviewhelpers.h:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 */
30template<class String>
31constexpr bool matchesAtOffset(QStringView view, qsizetype offset, String str)
32{
33 Q_ASSERT(offset >= 0);
34 const auto strSize = str.size();
35 return offset + strSize <= view.size() && view.sliced(offset, strSize) == str;
36}
37
38/**
39 * @copydoc matchesAtOffset(QStringView,qsizetype,String)

Callers 1

parseTextMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected