Luke
08/30/2021, 6:43 PMfun String?.orEmpty(): String
was not defined for CharSequence
? Is it a multiplatform constraint?Ruckus
08/30/2021, 6:51 PMorEmpty
would then also require a call to toString
in most any actual use case.ephemient
08/30/2021, 7:02 PMephemient
08/30/2021, 7:02 PM?: ""
so it's not a huge missing gapLuke
08/30/2021, 7:45 PMorEmpty
for String alone could justify the equivalent for CharSequence
, or at least something like fun <C, R> C?.ifNull(defaultValue: () -> R): R where C : R
, for functional programming style.Ruckus
08/30/2021, 7:48 PM