Crates.io

Fuzzy Matcher

Fuzzy matching algorithm(s) in Rust!

Usage

In your Cargo.toml add the following:

toml [dependencies] fuzzy-matcher = "*"

Here are some code example:

```rust use fuzzymatcher::FuzzyMatcher; use fuzzymatcher::skim::SkimMatcherV2;

let matcher = SkimMatcherV2::default(); asserteq!(None, matcher.fuzzymatch("abc", "abx")); assert!(matcher.fuzzymatch("axbycz", "abc").issome()); assert!(matcher.fuzzymatch("axbycz", "xyz").issome());

let (score, indices) = matcher.fuzzyindices("axbycz", "abc").unwrap(); asserteq!(indices, [0, 2, 4]); ```

More example

echo "axbycz" | cargo run --example fz "abc" and check what happens.

About the Algorithm

Skim

The skim is currently used by skim, a fuzzy finder.

Skim V2

Skim V1

Clangd