strdist

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Inhibit = 1<<63 - 1

Variables

This section is empty.

Functions

func Distance

func Distance(a, b string, f CostFunc, cut int64) int64

func GlobPath

func GlobPath(a, b string) bool

GlobPath returns true if a and b match using supported wildcards. Note that both a and b main contain wildcards, and it's up to the call site to constrain the string content if that's not desirable.

Supported wildcards:

?  - Any one character, except for /
*  - Any zero or more characters, except for /
** - Any zero or more characters, including /

func IsDebugOn

func IsDebugOn() bool

func SetDebug

func SetDebug(debug bool)

Enable the delivery of debug messages to the logger. Only meaningful if a logger is also set.

func SetLogger

func SetLogger(logger log_Logger)

Specify the *log.Logger object where log messages should be sent to.

Types

type Cost

type Cost struct {
	SwapAB  CostInt
	DeleteA CostInt
	InsertB CostInt
}

func StandardCost

func StandardCost(ar, br rune) Cost

type CostFunc

type CostFunc func(ar, br rune) Cost

type CostInt

type CostInt int64

func (CostInt) String

func (cv CostInt) String() string

Jump to

Keyboard shortcuts

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