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

Function skipFuzzyAndWhitespace

kdevplatform/util/formattinghelpers.cpp:573–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571 */
572template<typename ForwardIt>
573FuzzyMatchResult skipFuzzyAndWhitespace(ForwardIt& first, ForwardIt last, FuzzyMatcher& fuzzyMatcher, bool isInserted)
574{
575 Q_ASSERT(first != last);
576 Q_ASSERT(!first->isSpace());
577 do {
578 const auto result = fuzzyMatcher.add(&*first, isInserted);
579 if (result != FuzzyMatchResult::Fuzzy) {
580 return result;
581 }
582 ++first;
583 skipWhitespace(first, last);
584 } while (first != last);
585 return FuzzyMatchResult::Fuzzy;
586}
587
588/**
589 * Matches the given unformatted prefix against the given formatted text.

Callers 4

matchMethod · 0.85
matchFormattedTextFunction · 0.85

Calls 2

skipWhitespaceFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected