Class FuzzySearch
Utility class to perform matching against query text using a fuzzy search algorithm.
Namespace: UnityEditor.Search
Syntax
public static class FuzzySearch
Methods
FuzzyMatch(String, String, List<Int32>)
Declaration
public static bool FuzzyMatch(string pattern, string origin, List<int> matches = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | pattern | |
| String | origin | |
| List<Int32> | matches |
Returns
| Type | Description |
|---|---|
| Boolean |
FuzzyMatch(String, String, ref Int64, List<Int32>)
Performs a fuzzy search on a string to see if it matches a pattern.
Declaration
public static bool FuzzyMatch(string pattern, string origin, ref long outScore, List<int> matches = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | pattern | Pattern that we try to match the source string |
| String | origin | String we are looking into for a match |
| Int64 | outScore | Score of the match. A higher score means the pattern is a better match for the string. |
| List<Int32> | matches | List of indices in the source string where a match was found. |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if a match was found |