类 StringUtils

java.lang.Object
com.cdkjframework.util.tool.StringUtils
所有已实现的接口:
StringConstant, Serializable

@Component public class StringUtils extends Object implements Serializable, StringConstant
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • StringUtils

      public StringUtils()
  • 方法详细资料

    • format

      public static String format(int length, long value)
      补0
      参数:
      length - 长度
      value - 值
      返回:
      返回结果
    • isNullAndSpaceOrEmpty

      public static boolean isNullAndSpaceOrEmpty(Object obj)
      验证是否为空
      参数:
      obj - 数据
      返回:
      返回布尔值
    • isNotNullAndEmpty

      public static boolean isNotNullAndEmpty(Object obj)
      是否不为空
      参数:
      obj - 值
      返回:
      返回结果
    • contains

      public static boolean contains(Object str, char searchChar)
      包含指定
      参数:
      str - 原数据
      searchChar - 搜索字符
      返回:
      返回结果
    • contains

      public static boolean contains(Object str, String searchStr)
      包含指定
      参数:
      str - 原数据
      searchStr - 搜索字符
      返回:
      返回结果
    • convertInt

      public static int convertInt(Object obj)
      将值转换为整数
      参数:
      obj - 值
      返回:
      返回结果
    • convertLong

      public static Long convertLong(Object obj)
      转换为长整形
      参数:
      obj - 数据
      返回:
      返回结果
    • convertBoolean

      public static Boolean convertBoolean(Object obj)
      将值转换为布尔
      参数:
      obj - 值
      返回:
      返回结果
    • classFormat

      public static String classFormat(String clazzName)
      类名格式
      参数:
      clazzName - 类型名
      返回:
      返回结果
    • classFormat

      public static String classFormat(String clazzName, String splitter)
      属性名
      参数:
      clazzName - 属性名称
      splitter - 分割符
      返回:
      返回结果
    • attributeNameFormat

      public static String attributeNameFormat(String attributeName)
      属性名
      参数:
      attributeName - 属性名称
      返回:
      返回结果
    • attributeNameFormat

      public static String attributeNameFormat(String attributeName, String splitter)
      属性名
      参数:
      attributeName - 属性名称
      splitter - 分割符
      返回:
      返回结果
    • leftPad

      public static String leftPad(String str, int size, char padChar)
      左边2
      参数:
      str -
      size -
      padChar -
      返回:
      返回字符
    • leftPad

      public static String leftPad(String str, int size, String padStr)
      左边
      参数:
      str - 字符
      size - 大小
      padStr - 衬垫窜
      返回:
      返回结果
    • replaceAllBlank

      public static String replaceAllBlank(String str)
      字符串去除空白内容:
      • \n 回车
      • \t 水平制表符
      • \s 空格
      • \r 换行
      参数:
      str - 字符串
    • camelToUnderline

      public static String camelToUnderline(String param)
      字符串驼峰转下划线格式
      参数:
      param - 需要转换的字符串
      返回:
      转换好的字符串
    • isCharSequence

      public static boolean isCharSequence(Class<?> clazz)
      是否为CharSequence类型
      参数:
      clazz - class
      返回:
      true 为是 CharSequence 类型
    • checkValNotNull

      public static boolean checkValNotNull(Object object)
      判断对象是否不为空
      参数:
      object - ignore
      返回:
      ignore
    • checkValNull

      public static boolean checkValNull(Object object)
      判断对象是否为空
      参数:
      object - ignore
      返回:
      ignore
    • toStringTrim

      public static String toStringTrim(Object o)
      对象转为字符串去除左右空格
      参数:
      o - 带转换对象
      返回:
    • firstToLowerCase

      public static String firstToLowerCase(String param)
      首字母转换小写
      参数:
      param - 需要转换的字符串
      返回:
      转换好的字符串