refactor(bcrypt): 重构 BCrypt.kt 文件
- 将 BCrypt 对象中的函数转换为顶级函数 - 添加 @JvmName 注解以自定义 JVM 方法名 - 更新相关文件中的导入和引用 - 调整 DateTime 类的 parse 和 format 方法 - 优化 StringUtils 中的 isEmpty 方法
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* ProjectName mingli-utils
|
||||
* ModuleName mingli-utils.main
|
||||
* CurrentFile StringUtils.kt
|
||||
* LastUpdate 2025-09-15 22:32:50
|
||||
* LastUpdate 2025-09-17 21:09:10
|
||||
* UpdateUser MingLiPro
|
||||
*/
|
||||
@file:JvmName("StringUtils")
|
||||
@@ -28,14 +28,17 @@ import com.mingliqiye.utils.logger.mingLiLoggerFactory
|
||||
|
||||
val log = mingLiLoggerFactory.getLogger("StringUtils")
|
||||
|
||||
val NULLISH_STRINGS = setOf("null", "NaN", "undefined", "None", "none")
|
||||
|
||||
/**
|
||||
* 判断`字符串`是否为空
|
||||
*
|
||||
* @param str 待判断的字符串
|
||||
* @return `true`: 空 `false`: 非空
|
||||
*/
|
||||
fun isEmpty(str: String?): Boolean {
|
||||
return str?.isEmpty() != null
|
||||
@JvmName("isEmpty")
|
||||
fun String?.isNullish(): Boolean {
|
||||
return this == null || this.isBlank() || this in NULLISH_STRINGS
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user