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 StringconvertListToString(List<String> list) static StringconvertToUnicode(String str) 将中文字符串转换为Unicode编码static Stringstatic Stringstatic StringgetUid()带有时间戳的uuid UUID.randomUUID().toString()长度为36,我们去掉'-'之后,截取前半段static booleanisTestEmail(String email) static booleanisTestMobile(String mobile) for teststatic Stringuuid()UUID
-
Constructor Details
-
Utils
public 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:不包含中文字符
-