Ignore case in editDistance()

bug: 3278422

Change-Id: Ibd20488dcec215038970749b181857527311947b
main
Ken Wakasa 2010-12-21 23:59:30 +09:00
parent baf83886be
commit 9aa20e6ad1
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ public class Utils {
}
for (int i = 0; i < sl; ++i) {
for (int j = 0; j < tl; ++j) {
if (s.charAt(i) == t.charAt(j)) {
if (Character.toLowerCase(s.charAt(i)) == Character.toLowerCase(t.charAt(j))) {
dp[i + 1][j + 1] = dp[i][j];
} else {
dp[i + 1][j + 1] = 1 + Math.min(dp[i][j],