首页 > 技术文章 > 对字符串做预处理 、 工具类

xjbBill 2016-09-21 11:17 原文

1 /**
2      * 对字符串做预处理
3      * \s 匹配空格、制表符、换页符等空白字符
4      */
5     public static String pretreatString(String str) {
6         return str.replaceAll("\\s*", "");
7     }

推荐阅读