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实现去掉空格换行符回车的方法
最新推荐文章于 2024-06-29 03:20:07 发布