类 StringUtils

java.lang.Object
cn.starrys.core.util.StringUtils

public class StringUtils extends Object
字符串工具类。

creationTime: 2023/2/18 13:13 .

  • 字段详细资料

  • 构造器详细资料

    • StringUtils

      public StringUtils()
  • 方法详细资料

    • isEmpty

      public static boolean isEmpty(String str)
      判断字符串是否为空
      参数:
      str - 进行判断的字符串
      返回:
      当 str 为 null 或者 "" 时返回 true
    • notEmpty

      public static boolean notEmpty(String str)
      判断字符串是否不为空
      参数:
      str - 进行判断的字符串
      返回:
      当 str 不为 null 或者 "" 时返回 true
    • splices

      @NotNull public static @NotNull String splices(Object @NotNull ... strings)
      拼接字符串
      参数:
      strings - 字符对象数组
      返回:
      拼接后的字符串
    • md5

      @NotNull public static @NotNull String md5(String text)
      计算字符串的MD5(32位长度)
      参数:
      text - 进行计算的文本
      返回:
      text 的MD5
    • md5_16

      @NotNull public static @NotNull String md5_16(String text)
      计算字符串的MD5(16位长度)
      参数:
      text - 要计算的文本(若为空则返回 "")
      返回:
      text 的MD5