Google is committed to advancing racial equity for Black communities. See how.

Range

@Immutable data class Range<T>
kotlin.Any
   ↳ androidx.compose.ui.text.AnnotatedString.Range

The information attached on the text such as a SpanStyle.

Summary

Public constructors
<init>(item: T, start: Int, end: Int)

<init>(item: T, start: Int, end: Int, tag: String)

The information attached on the text such as a SpanStyle.

Properties
Int

The end of the range where item takes effect.

T

The object attached to AnnotatedStrings.

Int

The start of the range where item takes effect.

String

The tag used to distinguish the different ranges.

Public constructors

<init>

Range(
    item: T,
    start: Int,
    end: Int)

<init>

Range(
    item: T,
    start: Int,
    end: Int,
    tag: String)

The information attached on the text such as a SpanStyle.

Parameters
item: T The object attached to AnnotatedStrings.
start: Int The start of the range where item takes effect. It's inclusive
end: Int The end of the range where item takes effect. It's exclusive
tag: String 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.

Properties

end

val end: Int

The end of the range where item takes effect. It's exclusive

item

val item: T

The object attached to AnnotatedStrings.

start

val start: Int

The start of the range where item takes effect. It's inclusive

tag

val tag: String

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.