📅  最后修改于: 2022-03-11 15:00:18.083000             🧑  作者: Mango
String sizeString = 'Let\'s Imagine this is more than 120 Characters';
Integer maxSize = 120;
if(sizeString.length() > maxSize ){
sizeString = sizeString.substring(0, maxSize);
}