API Reference
Class
FuzzyMatcher
Matches and ranks short search patterns against display text.
Inheritance
- Object
- FuzzyMatcher
Methods
public static IReadOnlyList<FuzzyResult<T?>> Rank<T>(IEnumerable<T?> items, Func<T?, String> text, String pattern) #Returns:
IReadOnlyList<FuzzyResult<T?>>Ranks matching items by score, retaining source order for ties.
Type Parameters
- T
- The item type.
Parameters
- items System.Collections.Generic.IEnumerable<T?>
- The source items.
- text System.Func<T?, System.String>
- Gets searchable text for an item.
- pattern System.String
- The search pattern.
Returns
Matching results in rank order.
public static Boolean TryMatch(String pattern, String text, out FuzzyMatch? match) #Returns:
BooleanAttempts to match a pattern against text.
Parameters
- pattern System.String
- Terms separated by whitespace.
- text System.String
- The text to search.
- match ConsoleMonster.Text.FuzzyMatch?
- The score and matched positions when successful.
Returns
True when all positive terms match and no exclusion term matches.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?