We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b055fa commit 6895bfdCopy full SHA for 6895bfd
diffmatchpatch/diff.go
@@ -500,8 +500,8 @@ func commonSuffixLength(text1, text2 []rune) int {
500
// DiffCommonOverlap determines if the suffix of one string is the prefix of another.
501
func (dmp *DiffMatchPatch) DiffCommonOverlap(text1 string, text2 string) int {
502
// Cache the text lengths to prevent multiple calls.
503
- text1Length := len([]rune(text1))
504
- text2Length := len([]rune(text2))
+ text1Length := len(text1)
+ text2Length := len(text2)
505
// Eliminate the null case.
506
if text1Length == 0 || text2Length == 0 {
507
return 0
0 commit comments