mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-29 21:27:05 +02:00
Replaced util Min/Max functions with builtin
This commit is contained in:
parent
357932f9b0
commit
bcc7bf3167
5 changed files with 4 additions and 34 deletions
|
@ -33,7 +33,7 @@ func Similarity(s1 string, s2 string) float64 {
|
|||
s2 = norm.NFKC.String(s2)
|
||||
l1 := len([]rune(s1))
|
||||
l2 := len([]rune(s2))
|
||||
maxLen := util.Max(l1, l2)
|
||||
maxLen := max(l1, l2)
|
||||
// Empty strings always compare full equal
|
||||
if maxLen == 0 {
|
||||
return 1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue