If you are using the isBlank() or isEmpty() methods to assign default strings, consider using their ifBlank and ifEmpty counterparts instead. They are designed to make exactly this use-case more concise and to avoid repetition.
14
333
1K
0
41
Download Gif
@kotlin How about ifNullOrBlank { } for nullable types?
@kotlin Every thing like that makes me feel good in Kotlin, good job @jetbrains 👍👍. Keep improving it
@kotlin What a beautiful code we write in Kotlin, I can’t wait to use it in my next project!
@kotlin Amazing 🙂🙂. It's make very simple. Not using if else to check value "Blank"