Movatterモバイル変換


[0]ホーム

URL:


levenshtein

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:2Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMaxDist =xerrors.New("levenshtein: maxDist exceeded")

Functions

funcDistance

func Distance(a, bstring, maxDistint) (int,error)

Distance returns the edit distance between a and b using theWagner-Fischer algorithm.A and B must be less than 255 characters long.maxDist is the maximum distance to consider.A value of -1 for maxDist means no maximum.

funcMatches

func Matches(needlestring, maxDistanceint, haystack ...string) (matches []string)

Matches returns the closest matches to the needle from the haystack.The maxDistance parameter is the maximum Matches distance to consider.If no matches are found, an empty slice is returned.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp