fuzzy

package
v1.60.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fuzzy provides lightweight case-insensitive fuzzy subsequence matching with relevance scoring. It ranks in-memory search results (the playlist search and the file browser filter) without an external dependency: a greedy subsequence scan with a few positional bonuses is enough to rank track and file names, and stays small and allocation-light on the hot path of every keystroke.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(query, target string) (score int, ok bool)

Match reports whether query is a case-insensitive subsequence of target and, if so, a relevance score where higher is a better match. An empty query matches every target with score 0. ok is false when query is not a subsequence of target.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL