ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
levenshtein.h File Reference

Levenshtein distance algorithm for fuzzy string matching. More...

Go to the source code of this file.

Macros

#define LEVENSHTEIN_SUGGESTION_THRESHOLD   3
 Maximum edit distance to suggest an option.
 

Functions

ASCIICHAT_API size_t levenshtein (const char *a, const char *b)
 Calculate Levenshtein distance between two strings.
 
ASCIICHAT_API size_t levenshtein_n (const char *a, const size_t length, const char *b, const size_t bLength)
 Calculate Levenshtein distance with explicit string lengths.
 
ASCIICHAT_API const char * levenshtein_find_similar (const char *unknown, const char *const *candidates)
 Find the most similar string from a NULL-terminated array.
 

Detailed Description

Levenshtein distance algorithm for fuzzy string matching.

Definition in file levenshtein.h.