com.neko233.config233.utils.StringUtilsForConfig233.kt Maven / Gradle / Ivy
The newest version!
package com.neko233.config233.utils
object StringUtilsForConfig233 {
@JvmStatic
fun isEmpty(str: String?): Boolean {
return str.isNullOrEmpty()
}
@JvmStatic
fun isBlank(str: String?): Boolean {
return str.isNullOrBlank()
}
@JvmStatic
fun isNotBlank(str: String?): Boolean {
return !isBlank(str)
}
// 获取文件后缀名的方法
@JvmStatic
fun getFileExtensionName(fileName: String): String {
val lastDotIndex = fileName.lastIndexOf(".")
return if (lastDotIndex > 0) {
fileName.substring(lastDotIndex + 1)
} else {
""
}
}
}