append

fun append(text: String)

Appends the given String to this Builder.

Parameters

text

the text to append


open override fun append(text: CharSequence?): AnnotatedString.Builder

Appends text to this Builder if non-null, and returns this Builder.

If text is an AnnotatedString, all spans and annotations will be copied over as well. No other subtypes of CharSequence will be treated specially.


open override fun append(text: CharSequence?, start: Int, end: Int): AnnotatedString.Builder

Appends the range of text between start (inclusive) and end (exclusive) to this Builder if non-null, and returns this Builder.

If text is an AnnotatedString, all spans and annotations from text between start and end will be copied over as well. No other subtypes of CharSequence will be treated specially.

Parameters

start

The index of the first character in text to copy over (inclusive).

end

The index after the last character in text to copy over (exclusive).


open override fun append(char: Char): AnnotatedString.Builder


Appends the given AnnotatedString to this Builder.

Parameters

text

the text to append


fun append(text: AnnotatedString, start: Int, end: Int)

Appends the range of text between start (inclusive) and end (exclusive) to this Builder. All spans and annotations from text between start and end will be copied over as well.

Parameters

start

The index of the first character in text to copy over (inclusive).

end

The index after the last character in text to copy over (exclusive).