Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vforteli authored Aug 29, 2022
1 parent d62e70c commit 90d74d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ Searching for strings in strings
// Search using only substitutions and default maximum distance (3)
var results = FuzzySearch.Find("sometext", "here is someteext for you", SearchOptions.SubstitutionsOnly);

// Search using with more specific options, for example allowing more substitutions than insertions and deletions
var results = FuzzySearch.Find(word, text, new FuzzySearchOptions(3, 1, 1));

// Check for any matches using Linq. Using Any or First is more efficient than count since enumeration will stop after first match.
// This will not necessarily yield the best match though.
if(FuzzySearch.Find(word, text, 2).Any()) {
// do stuff
}


// Find returns a list of MatchResults with information about matches
public class MatchResult
{
Expand Down

0 comments on commit 90d74d8

Please sign in to comment.