clean code

This commit is contained in:
chenxudong 2025-01-09 16:12:59 +08:00
parent 85cafb7257
commit e0d3fc23ed
1 changed files with 0 additions and 20 deletions

View File

@ -26,26 +26,6 @@ public final class EleCommonUtil {
private static EleLog log = new EleLog(EleCommonUtil.class); private static EleLog log = new EleLog(EleCommonUtil.class);
public static String getFileName(String fileFullName) {
if (fileFullName == null) {
return "";
}
if (!fileFullName.contains(".")) {
return fileFullName;
}
int index = fileFullName.lastIndexOf(".");
return fileFullName.substring(0, index);
}
public static String getFileType(String fileFullName) {
if (fileFullName == null || !fileFullName.contains(".")) {
return "";
}
int index = fileFullName.lastIndexOf(".");
return fileFullName.substring(index + 1);
}
public static boolean isFileNameValid(String fileFullName) { public static boolean isFileNameValid(String fileFullName) {
if (StrUtil.isEmpty(fileFullName) || fileFullName.length() > 32) { if (StrUtil.isEmpty(fileFullName) || fileFullName.length() > 32) {
return false; return false;