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

Function matchesPath

kdevplatform/language/interfaces/abbreviations.cpp:101–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool matchesPath(const QString& path, const QString& typed)
102{
103 int consumed = 0;
104 int pos = 0;
105 // try to find all the characters in typed in the right order in the path;
106 // jumps are allowed everywhere
107 while (consumed < typed.size() && pos < path.size()) {
108 if (typed.at(consumed).toLower() == path.at(pos).toLower()) {
109 consumed++;
110 }
111 pos++;
112 }
113 return consumed == typed.size();
114}
115
116bool matchesAbbreviationMulti(QStringView word, const QStringList& typedFragments)
117{

Callers 1

matchPathFilterFunction · 0.85

Calls 2

sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected