|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Levenshtein distance algorithm for fuzzy string matching. More...
Go to the source code of this file.
Functions | |
| size_t | levenshtein_n (const char *a, const size_t length, const char *b, const size_t bLength) |
| size_t | levenshtein (const char *a, const char *b) |
| const char * | levenshtein_find_similar (const char *unknown, const char *const *candidates) |
Levenshtein distance algorithm for fuzzy string matching.
MIT licensed. Copyright (c) 2015 Titus Wormer titus.nosp@m.worm.nosp@m.er@gm.nosp@m.ail..nosp@m.com From: https://github.com/wooorm/levenshtein.c
Modified for ascii-chat to use project memory macros and UTF-8 character support.
Definition in file levenshtein.c.
| size_t levenshtein | ( | const char * | a, |
| const char * | b | ||
| ) |
Definition at line 74 of file levenshtein.c.
References utf8_char_count(), and utf8_to_codepoints().
Referenced by find_similar_option(), find_similar_option_with_mode(), and levenshtein_find_similar().
| const char * levenshtein_find_similar | ( | const char * | unknown, |
| const char *const * | candidates | ||
| ) |
Definition at line 149 of file levenshtein.c.
References levenshtein().
Referenced by asciichat_suggest_enum_value(), and asciichat_suggest_mode().
| size_t levenshtein_n | ( | const char * | a, |
| const size_t | length, | ||
| const char * | b, | ||
| const size_t | bLength | ||
| ) |
Definition at line 22 of file levenshtein.c.