Pattern p = Pattern.compile("\\s*|\t|\r|\n");
Matcher m = p.matcher(data);
String s = m.replaceAll("");
System.out.println (s );
Pattern p = Pattern.compile("\\s*|\t|\r|\n");
Matcher m = p.matcher(data);
String s = m.replaceAll("");
System.out.println (s );
本文标题:String 去除空格 回车 换行 水平制表符
本文链接:https://www.haomeiwen.com/subject/sgergktx.html
网友评论