NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
fuzzy.c
Go to the documentation of this file.
1
22
43
44#include "config.h"
45#include "fuzzy.h"
46#include "lib.h"
47
58int fuzzy_match(const char *pattern, const char *candidate, enum FuzzyAlgo algo,
59 const struct FuzzyOptions *opts, struct FuzzyResult *out)
60{
61 if (!pattern || !candidate)
62 return -1;
63
64 if (algo == FUZZY_ALGO_SUBSEQ)
65 return fuzzy_subseq_match(pattern, candidate, opts, out);
66
67 return -1;
68}
bool candidate(struct CompletionData *cd, char *user, const char *src, char *dest, size_t dlen)
Helper function for completion.
Definition helpers.c:79
Fuzzy matching library.
FuzzyAlgo
Fuzzy matching algorithm types.
Definition lib.h:76
@ FUZZY_ALGO_SUBSEQ
Subsequence matching algorithm.
Definition lib.h:77
int fuzzy_match(const char *pattern, const char *candidate, enum FuzzyAlgo algo, const struct FuzzyOptions *opts, struct FuzzyResult *out)
Perform fuzzy matching.
Definition fuzzy.c:58
Fuzzy matching library - private definitions.
int fuzzy_subseq_match(const char *pattern, const char *candidate, const struct FuzzyOptions *opts, struct FuzzyResult *out)
Perform subsequence fuzzy matching (UTF-8 aware, ASCII case-folding)
Definition subseq.c:262
Options for fuzzy matching.
Definition lib.h:87
Result of a fuzzy match.
Definition lib.h:98