Package com.bytedesk.core.utils
Class Utils
java.lang.Object
com.bytedesk.core.utils.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
判断字符串是否包含中文字符static String
convertListToString
(List<String> list) static String
convertToUnicode
(String str) 将中文字符串转换为Unicode编码static String
static String
static String
getUid()
带有时间戳的uuid UUID.randomUUID().toString()长度为36,我们去掉'-'之后,截取前半段static boolean
isTestEmail
(String email) static boolean
isTestMobile
(String mobile) for teststatic String
uuid()
UUID
-
Constructor Details
-
Utils
private Utils()
-
-
Method Details
-
uuid
UUID- Returns:
- UUID
-
getUid
带有时间戳的uuid UUID.randomUUID().toString()长度为36,我们去掉'-'之后,截取前半段- Returns:
- uuid
-
formatUid
-
isTestMobile
for test- Parameters:
mobile
-- Returns:
-
isTestEmail
-
getRandomCode
- Returns:
-
convertListToString
-
convertToUnicode
将中文字符串转换为Unicode编码- Parameters:
str
- 需要转换的中文字符串- Returns:
- Unicode编码字符串
-
containsChineseChar
判断字符串是否包含中文字符- Parameters:
str
- 要检查的字符串- Returns:
- true:包含中文字符 false:不包含中文字符
-