KCoreAddons
kfuzzymatcher.h
187 * std::transform(ranges.begin(), ranges.end(), std::back_inserter(out), [](const KFuzzyMatcher::Range &fr){
216 * @param type whether to consider ranges from full matches only or all matches including partial matches
222KCOREADDONS_EXPORT QList<KFuzzyMatcher::Range> matchedRanges(QStringView pattern, QStringView str, RangeType type = RangeType::FullyMatched);
Q_SCRIPTABLE Q_NOREPLY void start()
This namespace contains functions for fuzzy matching a list of strings against a pattern.
Definition kfuzzymatcher.h:80
KCOREADDONS_EXPORT bool matchSimple(QStringView pattern, QStringView str)
Simple fuzzy matching of chars in pattern with chars in str sequentially.
Definition kfuzzymatcher.cpp:211
@ All
We want ranges for all matches, even if the pattern partially matched the user supplied string.
@ FullyMatched
We want ranges only where the pattern fully matches the user supplied string.
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
This is the main function which does scored fuzzy matching.
Definition kfuzzymatcher.cpp:237
KCOREADDONS_EXPORT QList< 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
A range representing a matched sequence in a string.
Definition kfuzzymatcher.h:99
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.