1.0.3
Released version 1.0.3.
Implemented whatIfNotNullOrEmpty for string type.
We can execute a single lambda if the string is not null and not empty.
val nullableString: String? = "NotNullOrEmpty"
nullableString.whatIfNotNullOrEmpty {
log("$it is not null and not empty")
}Or we can handle the null or empty case.
nullableString.whatIfNotNullOrEmpty(
whatIf = { nullableString = it },
whatIfNot = { nullableString = "NullOrEmpty" }
)