fuzzytext

package
v0.0.0-...-972597a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SequentialBonus  = 15 // bonus for adjacent matches
	SeparatorBonus   = 30 // bonus if match occurs after a separator
	CamelBonus       = 30 // bonus if match is uppercase and prev is lower
	FirstLetterBonus = 15 // bonus if the first letter is matched

	MaxLeadingLetterPenalty = -15 // penalty applied for every letter in str before the first match
	LeadingLetterPenalty    = -5  // maximum penalty for leading letters
	UnmatchedLetterPenalty  = -1
)

Variables

This section is empty.

Functions

func MatchSimple

func MatchSimple(p, s string) (match bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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