diff --git a/Flow.Launcher.Plugin/IPublicAPI.cs b/Flow.Launcher.Plugin/IPublicAPI.cs index 681973905..b6f3f0680 100644 --- a/Flow.Launcher.Plugin/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/IPublicAPI.cs @@ -88,5 +88,7 @@ namespace Flow.Launcher.Plugin /// if you want to hook something like Ctrl+R, you should use this event /// event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; + + public (List MatchedData, int Score, bool Success) MatchString(string query, string stringToCompare); } } diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 0cc5a0e5d..5d1ea7f24 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -132,6 +132,12 @@ namespace Flow.Launcher public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; + public (List MatchedData, int Score, bool Success) MatchString(string query, string stringToCompare) + { + var result = StringMatcher.FuzzySearch(query, stringToCompare); + return (result.MatchData, result.Score, result.Success); + } + #endregion #region Private Methods @@ -144,6 +150,7 @@ namespace Flow.Launcher } return true; } + #endregion } }