MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / stringMatches

Function stringMatches

lib/macro/macro-search.cpp:191–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191static bool stringMatches(const std::string &text)
192{
193 const auto &settings = GetMacroSearchSettings();
194 const auto &regex = settings.regex;
195 const auto &searchString = settings.searchString;
196
197 if (regex.Enabled()) {
198 return regex.Matches(text, searchString);
199 }
200
201 return QString::fromStdString(text).contains(
202 QString::fromStdString(searchString), Qt::CaseInsensitive);
203}
204
205static bool segmentTypeMatches(MacroSegment *segment, bool isCondition)
206{

Callers 3

segmentTypeMatchesFunction · 0.70
segmentLabelMatchesFunction · 0.70
MacroMatchesSearchFilterFunction · 0.70

Calls 2

EnabledMethod · 0.45
MatchesMethod · 0.45

Tested by

no test coverage detected