Import std.text.fuzzy
Fuzzy
class
Public Class Fuzzy
Fuzzy matching's operations.
Examples
Expect(Fuzzy.Match("fb", "foobar")?.Positions == [0, 3])
Expect(Fuzzy.Match("fb", "xyz") == Null)
Expect(Fuzzy.Rank("fb", ["xyz", "foobar"]) == ["foobar"])-
The best match of
patternintext, or Null whentextdoesn't havepattern's characters in order. An emptypatternmatches anything, scoring 0. -
pattern's score intext, or Null when it doesn't match. -
The
candidatesthat matchpattern, the best first: by score, then the shorter, then in the order given.
Report an issue with this page or with FutureBlitz on GitHub.