对字符串做预处理 、 工具类

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

posted @ 2016-09-21 11:17  26个字符的地狱  阅读(293)  评论(0编辑  收藏  举报