KCoreAddons
kfuzzymatcher.cpp
112 static constexpr int leadingLetterPenalty = -5; // penalty applied for every letter in str before the first match
114 static constexpr int unmatchedLetterPenalty = -1; // penalty for every letter that doesn't matter
192 static bool match_internal(QStringView pattern, QStringView str, int &outScore, unsigned char *matches)
206 return match_recursive(patternIt, strIt, outScore, strIt, strEnd, patternEnd, nullptr, matches, 0, total, recursionCount);
261 QVector<KFuzzyMatcher::Range> KFuzzyMatcher::matchedRanges(QStringView pattern, QStringView str, RangeType type)
bool isEmpty() const const
QChar toLower() const const
T & last()
QString pattern(Mode mode=Reading)
KCOREADDONS_EXPORT QVector< KFuzzyMatcher::Range > matchedRanges(QStringView pattern, QStringView str, RangeType type=RangeType::FullyMatched)
A function which returns the positions + lengths where the pattern matched inside the str.
Definition: kfuzzymatcher.cpp:261
void push_back(const T &value)
QChar toUpper() const const
QStringView::const_iterator cbegin() const const
QStringView::const_iterator cend() const const
KCOREADDONS_EXPORT bool matchSimple(QStringView pattern, QStringView str)
Simple fuzzy matching of chars in pattern with chars in str sequentially.
Definition: kfuzzymatcher.cpp:211
QString::const_iterator cend() const const
bool isEmpty() const const
bool isUpper() const const
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
This is the main function which does scored fuzzy matching.
Definition: kfuzzymatcher.cpp:237
QString::const_iterator cbegin() const const
typedef const_iterator
bool isLower() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jul 4 2022 04:07:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jul 4 2022 04:07:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.