signed

QiShunwang

“诚信为本、客户至上”

java:String的trim()方法,去除字符串首尾空格

2021/4/26 22:20:05   来源:
String s = "   hfjs  df ";
s.trim(); //去除首尾空格
System.out.println(s); //输出结果"hfjs  df"