123
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user