去掉字符串中的空格

it2024-07-28  66

去掉字符串首末位置的空格 String str = str.trim(); 去掉非首末位的空格 String str = str.replace(" ", "");

转载于:https://www.cnblogs.com/wave-gbt/p/5803952.html

相关资源:删除字符串中空格的3种方法
最新回复(0)