All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.neko233.config233.utils.StringUtilsForConfig233.kt Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show 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 {
            ""
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy