isNotNullNotEmpty

fun String?.isNotNullNotEmpty(): Boolean

Return true if string not null and not empty.

Example:

val text: String? = null
text.isNotNullNotEmpty() // false

val text2 = "null"
text2.isNotNullNotEmpty() // false

val text3 = "hi"
text3.isNotNullNotEmpty() // true

val text4 = ""
text4.isNotNullNotEmpty() // false

Since

1.4.0

See also

isNotBlank