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实现去掉空格换行符回车的方法
最新推荐文章于 2025-05-19 21:31:46 发布