fuzzy
Pure nim fuzzy search implementation. Supports substrings etc
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install fuzzy
choosenim install fuzzy
git clone https://github.com/pigmej/fuzzy
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| fuzzy | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/pigmej/fuzzy |
|---|---|
| Homepage | https://github.com/pigmej/fuzzy |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
Fuzzy search library for nim
There are two important methods fuzzyMatch and fuzzyMatchSmart.
the usage is really straight forward:
var s1 = "foo bar baz"
var s2 = "bAz"
var s3 = "fobz"
var s4 = "bra"
echo fuzzyMatchSmart(s1, s2) # => 1.0
echo fuzzyMatchSmart(s1, s3) # => 0.5
echo fuzzyMatchSmart(s1, s4) # => 0.6
`fuzzyMatchSmart` tries to be smart about the strings so it does:
- lowercase whole string
- sorts substrings splitted by `" "`
- best matching substring of the length of the shorter one