public static String replace(String str) {
String destination = "";
if (str!=null) {
Pattern p = Pattern.compile("\\s*|\t|\r|\n");
Matcher m = p.matcher(str);
destination = m.replaceAll("");
}
return destination;
}
Java实现去掉空格换行符回车的方法
最新推荐文章于 2022-09-06 18:27:06 发布