set

inline operator fun Spannable.set(start: Int, end: Int, span: Any)(source)

Add span to the range startend of the text.

val s = "Hello, World!".toSpannable()
s[0, 5] = UnderlineSpan()

Note: The end value is exclusive.

See also


inline operator fun Spannable.set(range: IntRange, span: Any)(source)

Add span to the range of the text.

val s = "Hello, World!".toSpannable()
s[0..5] = UnderlineSpan()

Note: The range end value is exclusive.

See also