yan
05/27/2016, 11:49 PMSpannableStringBuilder
, which is stateful by its nature. Maybe something like this?
buildSpannableString {
append(“A”, Bold)
append(“B”, Bold, Italic)
append("C")
}
This is consistent with the buildString()
function in Kotlin stdlib.
This introduces state, but only inside the lambda, so the state is quite local.