fix(strutil): validate Hamming distance by rune count (#368)

This commit is contained in:
Yusuf Efe authored and GitHub committed 2026-10-23 18:14:41 +08:00
1 parent 99ed115de4
commit 33a7e5bf6d
2 files changed
+6 -4

No files matched your search

+3
View File
@@ -818,6 +818,9 @@ func TestHammingDistance(t *testing.T) {
{"abc", "def", 3},
{"kitten", "sitting", -1},
{"ö", "ü", 1},
{"abc", "你", -1},
{"你", "abc", -1},
{"a", "你", 1},
{"日本語", "日本語", 0},
{"日本語", "語日本", 3},
}