现在使用的方法比较土鳖,每次都要用下面这句来实现,不知道大家有没有更健壮的方法或者有现成的库可以参考?
if(string.length > 100) { string = string.substring(0,100)+"..."; }
相关分类