程序包 cn.starrys.util

类 StringUtils

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

public class StringUtils extends Object
字符串工具类

creationTime: 2022/12/4 16:56

  • 构造器详细资料

    • 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
    • md5

      @NotNull public static @NotNull String md5(String text)
      计算字符串的MD5
      参数:
      text - 要计算的字符串(若为空则返回 "")
      返回:
      text 的MD5