mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
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.
This commit is contained in:
parent
d4acdac317
commit
11bd6c3d68
2 changed files with 5 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -15,10 +15,7 @@ struct FuzzyMatchResult {
|
|||
int score { 0 };
|
||||
};
|
||||
|
||||
FuzzyMatchResult fuzzy_match_recursive(String const& needle, String const& haystack, size_t needle_idx, size_t haystack_idx,
|
||||
u8 const* src_matches, u8* matches, int next_match, int& recursion_count);
|
||||
|
||||
FuzzyMatchResult fuzzy_match(String const& needle, String const& haystack);
|
||||
FuzzyMatchResult fuzzy_match(StringView needle, StringView haystack);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue