3 ms·
Thank you very much for the detailed writeup. Several new things to learn for me in there. Not being able to use delegation here is a bummer, would be a great f
by scns 5y ago
Thank you very much for the detailed writeup. Several new things to learn for me in there. Not being able to use delegation here is a bummer, would be a great fit.
While trying to write up a clever solution using [0] i stumbled over String.isNullOrBlank()
[0] https://kotlinlang.org/docs/scope-functions.html https://kotlinlang.org/docs/scope-functions.html
(edit)
if (s.isNullOrBlank()) {
doOtherStuff()
} else {
doStuff(s) // takes a NotBlankString
}
If you are sure it is not null you can use String.isBlank()