core-ktx / androidx.text / kotlin.CharSequence / toSpanned

toSpanned

inline fun CharSequence.toSpanned(): Spanned

Returns a new Spanned from CharSequence, or the source itself if it is already an instance of SpannedString.