程序包 cn.zhxu.bs.util

类 StringUtils

java.lang.Object
cn.zhxu.bs.util.StringUtils

public class StringUtils extends Object
  • 构造器详细资料

    • StringUtils

      public StringUtils()
  • 方法详细资料

    • isNotBlank

      public static boolean isNotBlank(String str)
      参数:
      str - 字符串
      返回:
      是否不空
    • isBlank

      public static boolean isBlank(String str)
      参数:
      str - 字符串
      返回:
      是否为空
    • firstCharToLoweCase

      public static String firstCharToLoweCase(String str)
      首字母小写
      参数:
      str - 字符串
      返回:
      String
    • containCount

      public static int containCount(String src, int from, int to, char[] targets)
      查找 src 里包含几个 target
      参数:
      src - 源字符串
      from - 开始计数下标(包含)
      to - 结束计数下标(不包含)
      targets - 目标字符
      返回:
      个数
    • toHyphenation

      public static String toHyphenation(String src, String hyphenation)
      驼峰风格风格转连字符风格
      参数:
      src - 驼峰字符串
      hyphenation - 连字符
      返回:
      连字符风格字符串
    • toUnderline

      public static String toUnderline(String src)
      驼峰风格风格转下划线风格
      参数:
      src - 驼峰字符串
      返回:
      下划风格字符串
    • sqlContains

      public static boolean sqlContains(String sql, String column)
      快速判断 SQL 片段中是否包含某个列
      参数:
      sql - SQL 片段
      column - 列名
      返回:
      sql 中是否包含 column
    • isSqlColumnChar

      public static boolean isSqlColumnChar(char c)
    • countOf

      public static int countOf(String str, char target)