Commit graph

5 commits

Author SHA1 Message Date
Tim Ledbetter
e4fddc75f8 AK/FuzzyMatch: Check every match for neighbor character bonuses
Previously, the first match index was not checked to see if the camel
case or separator bonuses applied. The camel case bonus could also be
incorrectly applied where strings had non-alphabetical characters.
2023-10-06 22:09:18 +02:00
Tim Ledbetter
292017d7bd AK/FuzzyMatch: Use a first letter bonus of 15 rather than 20
This matches the value used in the original `lib_fts` implementation
of the algorithm.
2023-10-06 22:09:18 +02:00
Andrew Kaster
7ab37ee22c Everywhere: Remove string.h include from AK/Traits.h and resolve fallout
A lot of places were relying on AK/Traits.h to give it strnlen, memcmp,
memcpy and other related declarations.

In the quest to remove inclusion of LibC headers from Kernel files, deal
with all the fallout of this included-everywhere header including less
things.
2023-01-21 10:43:59 -07:00
Timothy Flynn
11bd6c3d68 AK: Do not require an allocated String for fuzzy matching
A StringView is sufficient here. This also removes the declaration of
fuzzy_match_recursive from the header, as it's only needed from within
the implementation file.
2022-09-20 11:08:54 +01:00
Ben Wiederhake
9c75d9e2cb AK: Move heavyweight fuzzy matching to own compilation unit 2022-09-18 13:27:24 -04:00