Files
PowerToys/src/modules/launcher/Wox.Infrastructure/FuzzyMatcher.cs
Alekhya Reddy Kommuru b26255e60a Add 'src/modules/launcher/' from commit '28acd466b352a807910cebbc74477d3173b31511'
git-subtree-dir: src/modules/launcher
git-subtree-mainline: 852689b3df
git-subtree-split: 28acd466b3
2020-03-10 14:15:29 -07:00

33 lines
849 B
C#

using System;
namespace Wox.Infrastructure
{
[Obsolete("This class is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
public class FuzzyMatcher
{
private string query;
private MatchOption opt;
private FuzzyMatcher(string query, MatchOption opt)
{
this.query = query.Trim();
this.opt = opt;
}
public static FuzzyMatcher Create(string query)
{
return new FuzzyMatcher(query, new MatchOption());
}
public static FuzzyMatcher Create(string query, MatchOption opt)
{
return new FuzzyMatcher(query, opt);
}
public MatchResult Evaluate(string str)
{
return StringMatcher.Instance.FuzzyMatch(query, str, opt);
}
}
}