Join Slack
Powered by
is there a better way to do something like: if(isB...
# announcements
b
Bernhard
04/10/2019, 9:39 AM
is there a better way to do something like: if(isBlankOrNull(string))
d
diesieben07
04/10/2019, 9:41 AM
string.isNullOrBlank()
b
Bernhard
04/10/2019, 9:41 AM
thank you!
Bernhard
04/10/2019, 9:43 AM
I suppose creating methods on nullable types requires you to use extension functions right?
d
diesieben07
04/10/2019, 9:44 AM
Yes
b
Burkhard
04/10/2019, 9:44 AM
Yes, it does.
fun String?.isNullOrBlank() = ...
4
Views
Open in Slack
Previous
Next