NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
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
58
int
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
}
candidate
bool candidate(struct CompletionData *cd, char *user, const char *src, char *dest, size_t dlen)
Helper function for completion.
Definition
helpers.c:79
lib.h
Fuzzy matching library.
FuzzyAlgo
FuzzyAlgo
Fuzzy matching algorithm types.
Definition
lib.h:81
FUZZY_ALGO_SUBSEQ
@ FUZZY_ALGO_SUBSEQ
Subsequence matching algorithm.
Definition
lib.h:82
fuzzy_match
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.h
Fuzzy matching library - private definitions.
fuzzy_subseq_match
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
FuzzyOptions
Options for fuzzy matching.
Definition
lib.h:92
FuzzyResult
Result of a fuzzy match.
Definition
lib.h:103