类 StringUtil

java.lang.Object
cn.vonce.sql.uitls.StringUtil

public class StringUtil extends Object
字符串工具类
  • 字段详细资料

    • PLACEHOLDER_PREFIX

      public static final String PLACEHOLDER_PREFIX
      占位符前缀: "${"
      另请参阅:
    • PLACEHOLDER_SUFFIX

      public static final String PLACEHOLDER_SUFFIX
      占位符后缀: "}"
      另请参阅:
  • 构造器详细资料

    • StringUtil

      public StringUtil()
  • 方法详细资料

    • isEmpty

      public static boolean isEmpty(Object str)
    • isNotEmpty

      public static boolean isNotEmpty(Object str)
    • isBlank

      public static boolean isBlank(Object str)
    • isNotBlank

      public static boolean isNotBlank(Object str)
    • getUUid

      public static String getUUid()
      生成UUID
    • randomCode

      public static String randomCode(int length)
      生成一个几位的随机数
      参数:
      length - 随机数的长度
    • resolvePlaceholders

      public static String resolvePlaceholders(String text, Map<String,String> params)
      将一段文本的占位符替换 如:${name} to zhangsan
      参数:
      text - 要替换的文本
      params - map.key = name,map.value = zhangsan
      返回:
      替换后的文本
    • underlineToHump

      public static String underlineToHump(String para)
      下划线命名转为驼峰命名
      参数:
      para - 下划线命名的字符串
    • humpToUnderline

      public static String humpToUnderline(String hump)
      驼峰命名转为下划线命名
      参数:
      hump - 驼峰命名的字符串
    • humpToHyphen

      public static String humpToHyphen(String hump)
      驼峰命名转为连字符命名
      参数:
      hump - 驼峰命名的字符串
    • humpTo

      public static String humpTo(String hump, String symbol)
      驼峰命名转为符号分割命名
      参数:
      hump - 驼峰命名的字符串
      symbol - 符号
    • firstToUpperCase

      public static String firstToUpperCase(String str)
      首字母转大写
      参数:
      str -
      返回:
    • getBracketContent

      public static String getBracketContent(String content)
      获取指定字符串中括号内的内容,返回字符串数组
      参数:
      content -
      返回:
    • getWord

      public static String getWord(String content)
      排除括号及括号内的数据
      参数:
      content -
      返回: