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

jchanghong.kotlin.Strings.kt Maven / Gradle / Ivy

There is a newer version: 3.0.38
Show newest version
package jchanghong.kotlin

import cn.hutool.core.util.StrUtil

fun main() {
    println("".isNotNUllOrBlank())
    println("Asasa".removePreAndLowerFirst(null))
}

fun String?.isNotNUllOrBlank() = !this.isNullOrBlank()

fun String?.toCamelCase(): String {
    this?:return ""
  return  StrUtil.toCamelCase(this)
}
fun String?.toUnderlineCase(): String {
    this?:return ""
    return  StrUtil.toUnderlineCase(this)
}
fun String?.removePreAndLowerFirst(prefix:String?): String {
    this?:return ""
    return  StrUtil.removePreAndLowerFirst(this,prefix?:"")
}








© 2015 - 2024 Weber Informatics LLC | Privacy Policy