📜  如果字符串长于最大大小,则顶点截断字符串 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:18.083000             🧑  作者: Mango

代码示例1
String sizeString = 'Let\'s Imagine this is more than 120 Characters';
Integer maxSize = 120;
if(sizeString.length() > maxSize ){
    sizeString = sizeString.substring(0, maxSize);
}