append

open override fun append(char: Char): OudsAnnotatedString.Builder<T>

Appends the given String to this Builder.

Return

This Builder instance.

Parameters

text

The text to append.


open override fun append(text: CharSequence?): OudsAnnotatedString.Builder<T>

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

If text is an OudsAnnotatedString, all spans and annotations will be copied over as well. No other subtypes of CharSequence will be treated specially. For example, any platform-specific types, such as SpannedString on Android, will only have their text copied and any other information held in the sequence, such as Android Spans, will be dropped.

Return

This Builder instance.

Parameters

text

The text to append.


open override fun append(text: CharSequence?, start: Int, end: Int): OudsAnnotatedString.Builder<T>

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 OudsAnnotatedString, 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. For example, any platform-specific types, such as SpannedString on Android, will only have their text copied and any other information held in the sequence, such as Android Spans, will be dropped.

Return

This Builder instance.

Parameters

text

The text to append.

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).


fun append(text: String)

Appends the given String to this Builder.

Parameters

text

The text to append.


fun append(text: T)

Appends an annotated string to this builder, preserving its formatting.

Parameters

text

The annotated string to append.


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

Appends a portion of an annotated string to this builder, preserving its formatting.

Parameters

text

The annotated string to append from.

start

The starting index (inclusive).

end

The ending index (exclusive).