Blame view

C5/app/src/main/java/com/sunvote/xpadapp/utils/MyStringUtil.java 455 Bytes
fac86401   孙向锦   初始化C5 Vote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  package com.sunvote.xpadapp.utils;
  
  import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  /**
   * Created by lihuimin on 2017/7/26.
   */
  
  public class MyStringUtil {
  
      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;
      }
  }