- public static String replaceBlank(String str) {
- String dest = "";
- if (str!=null) {
- Pattern p = Pattern.compile("\\s*|\t|\r|\n");
- Matcher m = p.matcher(str);
- dest = m.replaceAll("");
- }
- return dest;
- }
去除字符串中的空格、制表符、换行、回车
最新推荐文章于 2023-11-30 17:03:43 发布