类 StringUtils

java.lang.Object
com.github.aqiu202.util.StringUtils

public abstract class StringUtils extends Object
作者:
aqiu 2020/12/13 0:02
  • 字段详细资料

    • PLACEHOLDER_PREFIX

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

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

    • StringUtils

      public StringUtils()
  • 方法详细资料

    • isEmpty

      public static boolean isEmpty(CharSequence str)
    • hasText

      public static boolean hasText(CharSequence str)
    • isNotEmpty

      public static boolean isNotEmpty(CharSequence str)
    • isBlank

      public static boolean isBlank(CharSequence str)
    • isNotBlank

      public static boolean isNotBlank(CharSequence str)
    • equals

      public static boolean equals(CharSequence cs1, CharSequence cs2)
    • equalsAny

      public static boolean equalsAny(CharSequence string, CharSequence... searchStrings)
    • equalsAnyIgnoreCase

      public static boolean equalsAnyIgnoreCase(CharSequence string, CharSequence... searchStrings)
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(CharSequence cs1, CharSequence cs2)
    • camelToUnderline

      public static String camelToUnderline(String name)
      驼峰法转下划线
      参数:
      name - 字段
      返回:
      下划线格式字段
    • camelToUnderlineAndToUpperCase

      public static String camelToUnderlineAndToUpperCase(String name)
      驼峰法转下划线然后大写
      参数:
      name - 字段名称
      返回:
      转换后的大写字段名称
    • underlineToCamel

      public static String underlineToCamel(String name)
      下划线转驼峰
      参数:
      name - 字段名称
      返回:
      转换后的驼峰格式字段名称
    • capitalize

      public static String capitalize(String str)
    • uncapitalize

      public static String uncapitalize(String str)
    • stringFormat

      public static String stringFormat(String text, Map<String,Object> parameter)
      占位符替换
      参数:
      text - 字符串
      parameter - 替换参数
      返回:
      替换后的字符串
    • stringFormat

      public static String stringFormat(String text, Object... parameter)
      占位符替换
      参数:
      text - 字符串
      parameter - 替换参数
      返回:
      替换后的字符串
    • stringFormatWithNull

      public static String stringFormatWithNull(String text, Map<?,?> parameter, String nullValueReplacement)
      占位符替换
      参数:
      text - 字符串
      parameter - 替换参数
      nullValueReplacement - 空值的默认值
      返回:
      替换后的字符串