类 StringUtil

java.lang.Object
com.budwk.app.base.utils.StringUtil

public class StringUtil extends Object
Created by wizzer on 2018/3/17.
  • 构造器详细资料

    • StringUtil

      public StringUtil()
  • 方法详细资料

    • getPath

      public static String getPath(String p)
      去掉URL中?后的路径
      参数:
      p -
      返回:
    • getParentId

      public static String getParentId(String s)
      获得父节点ID
      参数:
      s -
      返回:
    • getRndNumber

      public static String getRndNumber(int s)
      得到n位随机数
      参数:
      s -
      返回:
    • startWith

      public boolean startWith(String str, String s)
      判断是否以字符串开头
      参数:
      str -
      s -
      返回:
    • contains

      public boolean contains(String str, String s)
      判断是否包含字符串
      参数:
      str -
      s -
      返回:
    • toJson

      public String toJson(Object obj)
      将对象转为JSON字符串(页面上使用)
      参数:
      obj -
      返回: