From 3488068810307387117626066240761195266659 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Sun, 30 Jun 2024 18:14:39 -0400 Subject: Add fuzzy completion to the python console Co-Authored-By: Rusty Wagner Co-Authored-By: Kyle Miles --- binaryninjaapi.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'binaryninjaapi.cpp') diff --git a/binaryninjaapi.cpp b/binaryninjaapi.cpp index 6610782d..202019ed 100644 --- a/binaryninjaapi.cpp +++ b/binaryninjaapi.cpp @@ -585,3 +585,14 @@ fmt::format_context::iterator fmt::formatter::format(cons { return fmt::format_to(ctx.out(), "{}", obj.GetString()); } + + +std::optional BinaryNinja::FuzzyMatchSingle(const std::string& target, const std::string& query) +{ + size_t result = BNFuzzyMatchSingle(target.c_str(), query.c_str()); + if (result == 0) + { + return std::nullopt; + } + return result; +} -- cgit v1.3.1