AnnotatedString

@Immutable
class AnnotatedString : CharSequence

The basic data structure of text with multiple styles. To construct an AnnotatedString you can use Builder.

Types

Link copied to clipboard
class Builder(capacity: Int = 16) : Appendable

Builder class for AnnotatedString. Enables construction of an AnnotatedString using methods such as append and addStyle.

Link copied to clipboard
@Immutable
class Range<T>(val item: T, val start: Int, val end: Int)

The information attached on the text such as a SpanStyle.

Properties

Link copied to clipboard
open override val length: Int
Link copied to clipboard

All SpanStyle that have been applied to a range of this String

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Char
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
@Stable
operator fun plus(other: AnnotatedString): AnnotatedString
Link copied to clipboard
open override fun subSequence(startIndex: Int, endIndex: Int): AnnotatedString

Return a substring for the AnnotatedString and include the styles in the range of startIndex (inclusive) and endIndex (exclusive).

Link copied to clipboard
open override fun toString(): String