Class Utils

java.lang.Object
com.bytedesk.core.utils.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      private Utils()
  • Method Details

    • uuid

      public static String uuid()
      UUID
      Returns:
      UUID
    • getUid

      public static String getUid()
      带有时间戳的uuid UUID.randomUUID().toString()长度为36,我们去掉'-'之后,截取前半段
      Returns:
      uuid
    • formatUid

      public static String formatUid(String orgUid, String uid)
    • isTestMobile

      public static boolean isTestMobile(String mobile)
      for test
      Parameters:
      mobile -
      Returns:
    • isTestEmail

      public static boolean isTestEmail(String email)
    • getRandomCode

      public static String getRandomCode()
      Returns:
    • convertListToString

      public static String convertListToString(List<String> list)
    • convertToUnicode

      public static String convertToUnicode(String str)
      将中文字符串转换为Unicode编码
      Parameters:
      str - 需要转换的中文字符串
      Returns:
      Unicode编码字符串
    • containsChineseChar

      public static boolean containsChineseChar(String str)
      判断字符串是否包含中文字符
      Parameters:
      str - 要检查的字符串
      Returns:
      true:包含中文字符 false:不包含中文字符