Releases: ordo-one/FuzzyMatch
1.3.2
1.3.1
1.3.1 (2026-03-15)
FuzzySearch — Interactive Example App
A new macOS example app for exploring how FuzzyMatch works interactively. It loads the full 271K financial instrument corpus and live-searches as you type, showing the top 20 results with highlighted matched characters. Switch between Edit Distance and Smith-Waterman algorithms to see how they rank differently, or use File > Open (Cmd+O) to load your own newline-delimited data.
Open the Xcode project and hit Run:
open Examples/FuzzySearch/FuzzySearch.xcodeprojCommits
1.3.0
1.3.0 (2026-03-13)
New API
attributedHighlight(_:against:applying:) — styled AttributedString
Returns an AttributedString with matched ranges styled via the caller's closure, or nil if no match. Requires Foundation (#if canImport(Foundation)).
Foundation (cross-platform):
let matcher = FuzzyMatcher()
if let text = matcher.attributedHighlight("format:modern", against: "mod", applying: {
$0.inlinePresentationIntent = .stronglyEmphasized
}) {
// "mod" is bold, rest is unstyled
}SwiftUI (Apple platforms):
if let text = matcher.attributedHighlight("format:modern", against: "mod", applying: {
$0.foregroundColor = .orange
$0.font = .body.bold()
}) {
Text(text) // "mod" in orange bold
}Both methods also accept a pre-prepared FuzzyQuery for repeated use:
let query = matcher.prepare("mod")
let result = matcher.attributedHighlight(candidate, against: query, applying: { ... })highlight(_:against:) — matched character ranges
Returns [Range<String.Index>] of matched character positions, or nil if no match. Use this when you need full control over rendering or are not using AttributedString.
let matcher = FuzzyMatcher()
let query = matcher.prepare("mod")
if let ranges = matcher.highlight("format:modern", against: query) {
// ranges covers the "mod" in "modern"
for range in ranges {
print(candidate[range]) // "mod"
}
}Convenience overload accepting a raw query string:
if let ranges = matcher.highlight("format:modern", against: "mod") { ... }Features
- add attributedHighlight() convenience API for styled AttributedString (3d227fd)
- minor: Add highlight(_:against:) API for matched character ranges (3ba2c5e)
- minor: Add highlight(_:against:) API for matched character ranges (#16) (685f698)
Bug Fixes
- anchor prefix-typo highlights at position 0 via prefixMode traceback (bf4039d)
- guard attributedHighlight() API behind #if canImport(Foundation) (161c66c)
- Linux compatibility for AttributedString tests and var warning (2af3e9a)
- resolve highlight() API bugs — transposition truncation, score/highlight divergence, acronym mismatch (cd692b0)
1.2.2
1.2.0
1.2.0 (2026-03-03)
Features
- minor: Support legacy Apple operating systems (macOS 14+, iOS 17+) (95961d8)
Bug Fixes
- scope escaped buffer pointers + guard empty lowercaseUTF8 + update benchmarks (9b7bc6c)
- support Linux in comparison benchmark harnesses (d5e99a4)
- use UTF-8 API outputs in comparison table generation (fc58e38)
Performance Improvements
- optimize UnsafeBufferPointer hot paths to recover Span-era throughput (93cfb01)
- use UTF-8 hot path in fuzzygrep + update benchmarks and docs (256afa8)
Reverts
- remove synced CI config files (7a87c42)
