diff --git a/include/string.hpp b/include/string.hpp index 29ba0504..2c6c3649 100644 --- a/include/string.hpp +++ b/include/string.hpp @@ -31,12 +31,6 @@ bool startsWith(const std::string& str, const std::string& prefix); /** Returns whether a string ends with the given substring. */ bool endsWith(const std::string& str, const std::string& suffix); -/** Scores how well a query matches a string. -A score of 0 means no match. -The score is arbitrary and is only meaningful for sorting. -*/ -float fuzzyScore(const std::string& s, const std::string& query); - /** Converts a byte array to a Base64-encoded string. https://en.wikipedia.org/wiki/Base64 */ diff --git a/src/string.cpp b/src/string.cpp index fe69a824..22c41cae 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -100,15 +100,6 @@ bool endsWith(const std::string& str, const std::string& suffix) { } -float fuzzyScore(const std::string& s, const std::string& query) { - size_t pos = s.find(query); - if (pos == std::string::npos) - return 0.f; - - return (float)(query.size() + 1) / (s.size() + 1); -} - - std::string toBase64(const uint8_t* data, size_t dataLen) { static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";