类 StringUtil


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

      • StringUtil

        public StringUtil()
    • 方法详细资料

      • getPlatformUid

        public static String getPlatformUid()
        获取平台后台登陆UID
        返回:
      • getPlatformLoginname

        public static String getPlatformLoginname()
        获取平台后台登陆用户名称
        返回:
      • getPlatformUsername

        public static String getPlatformUsername()
        获取平台后台登陆用户名称
        返回:
      • 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 -
        返回: