Source File
match.go
Belonging Package
github.com/sergi/go-diff/diffmatchpatch
package diffmatchpatch
import (
)
return 0
return -1
return
return .MatchBitap(, , )
}
:= .MatchAlphabet()
:= indexOf(, , )
if != -1 {
= math.Min(.matchBitapScore(0, , ,
= lastIndexOf(, , +len())
if != -1 {
= math.Min(.matchBitapScore(0, , ,
), )
}
}
= 0
=
for < {
if .matchBitapScore(, +, , ) <= {
=
} else {
=
}
= (-)/2 +
= 0
} else if , := [[-1]]; ! {
= 0
} else {
= [[-1]]
}
[] = (([+1] << 1) | 1) &
[] = (([+1]<<1)|1)& | ((([+1] | []) << 1) | 1) | [+1]
}
if ([] & ) != 0 {
=
= - 1
break
}
}
}
}
break
}
=
}
return
}
if == 0 {
return
}
return 1.0
}
return + ( / float64(.MatchDistance))
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |