This commit is contained in:
鲨鱼
2024-12-18 18:01:41 +08:00
parent e3b42216f1
commit 10a5f1c903
14 changed files with 334 additions and 4 deletions

View File

@@ -322,4 +322,15 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
.collect(Collectors.toList());
}
public static String cat(String str,Integer num){
if(str == null){
return str;
}
if(str.length() < num){
return str;
}
return str.substring(0,num);
}
}