utils

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSimilarWord

func IsSimilarWord(given string, suggestion string) bool

IsSimilarWord calculates "The Levenshtein Distance" between two strings which represents the minimum total cost of edits that would convert the first string into the second. If the distance is less than 3, the word is considered misspelled.

func SlicesContains

func SlicesContains[E comparable](s []E, v E) bool

SlicesContains reports whether v is present in s. https://pkg.go.dev/golang.org/x/exp/slices#Contains

Types

This section is empty.

Jump to

Keyboard shortcuts

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