Class

AnnotatedString.Range

The information attached on the text such as a SpanStyle.

Common
data class Range<T>(val item: T, val start: Int, val end: Int, val tag: String)

The information attached on the text such as a SpanStyle.

Parameters

item The object attached to AnnotatedStrings.
start The start of the range where item takes effect. It's inclusive
end The end of the range where item takes effect. It's exclusive
tag The tag used to distinguish the different ranges. It is useful to store custom data. And Ranges with same tag can be queried with functions such as getStringAnnotations.

Secondary Constructors

constructor(item: T, start: Int, end: Int) : this(item, start, end, "")