Returns true
if this char sequence is not empty and contains some characters except of whitespace characters.
Since Kotlin
1.1Samples
import java.util.Locale
import kotlin.test.*
fun main() {
fun validateName(name: String): String {
require(name.isNotBlank()) { "Name cannot be blank" }
return name
}
println(validateName("Adam"))
}
Target: JVMRunning on v.2.1.20
Returns true
if this char sequence is not empty and contains some characters except of whitespace characters.
Since Kotlin
1.0Samples
import java.util.Locale
import kotlin.test.*
fun main() {
fun validateName(name: String): String {
require(name.isNotBlank()) { "Name cannot be blank" }
return name
}
println(validateName("Adam"))
}
Target: JVMRunning on v.2.1.20