java 字符串去空格

String str = " hell ,    午饭,,晚饭  ";
String str2 = str.replaceAll(" ", "");

猜你喜欢

转载自blog.csdn.net/meixi_android/article/details/79923638
今日推荐