更新
调整:/tlocale 命令重构 调整:bstats 统计跳过配置文件判断 修复:NMSUtil19 工具的部分语法错误导致 1.8 版本启动报错 修复:StirngUtils 工具 similarDegree 方法的蜜汁报错 新增:面子工程
This commit is contained in:
@@ -36,9 +36,13 @@ public class StringUtils {
|
||||
public static double similarDegree(String strA, String strB){
|
||||
String newStrA = removeSign(max(strA, strB));
|
||||
String newStrB = removeSign(min(strA, strB));
|
||||
int temp = Math.max(newStrA.length(), newStrB.length());
|
||||
int temp2 = longestCommonSubstring(newStrA, newStrB).length();
|
||||
return temp2 * 1.0 / temp;
|
||||
try {
|
||||
int temp = Math.max(newStrA.length(), newStrB.length());
|
||||
int temp2 = longestCommonSubstring(newStrA, newStrB).length();
|
||||
return temp2 * 1.0 / temp;
|
||||
} catch (Exception ignored) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static String max(String strA, String strB) {
|
||||
|
||||
Reference in New Issue
Block a user