Builder

open class Builder : CharSequence

A modified wrapper of StringBuilder that internally calls formatString on all append calls.

Constructors

Link copied to clipboard
constructor()
Create a new instance of the builder with default initial capacity 16.
constructor(initial: String)
Create a new instance of the builder with the specified initial string.
constructor(capacity: Int)
Create a new instance of the builder with the specified initial capacity.

Functions

Link copied to clipboard
Append an object to the builder.
open fun append(@NonNull fstring: String, @Nullable objs: Array<Any>): Text.Builder
Append a string to the builder using a formatString call.
Link copied to clipboard
open fun appendCodePoint(codePoint: Int): Text.Builder
Appends the string representation of the codePoint argument to this sequence.
Link copied to clipboard
open fun charAt(index: Int): Char
Link copied to clipboard
open fun delete(start: Int, end: Int): Text.Builder
Removes the characters in a substring of this sequence.
Link copied to clipboard
open fun deleteCharAt(index: Int): Text.Builder
Removes the char at the specified position in this sequence.
Link copied to clipboard
open fun indexOf(str: String): Int
Returns the index within this string of the first occurrence of the specified substring.
open fun indexOf(str: String, fromIndex: Int): Int
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
Link copied to clipboard
open fun insert(offset: Int, obj: Any): Text.Builder
Inserts the string representation of the Object argument into this character sequence.
open fun insert(offset: Int, @NonNull fstring: String, @Nullable objs: Array<Any>): Text.Builder
Inserts the string representation of the Object argument into this character sequence after applying a formatString call.
open fun insert(index: Int, str: Array<Char>, offset: Int, len: Int): Text.Builder
Inserts the string representation of a subarray of the str array argument into this sequence.
Link copied to clipboard
open fun lastIndexOf(str: String): Int
Returns the index within this string of the rightmost occurrence of the specified substring.
open fun lastIndexOf(str: String, fromIndex: Int): Int
Returns the index within this string of the last occurrence of the specified substring.
Link copied to clipboard
open fun length(): Int
Link copied to clipboard
open fun replace(start: Int, end: Int, str: String): Text.Builder
Replaces the characters in a substring of this sequence with characters in the specified String.
Link copied to clipboard
open fun reverse(): Text.Builder
Causes this character sequence to be replaced by the reverse of the sequence.
Link copied to clipboard
open fun subSequence(start: Int, end: Int): CharSequence
Link copied to clipboard
open fun toString(): String

Inherited functions

Link copied to clipboard
open fun chars(): IntStream
Link copied to clipboard
open fun codePoints(): IntStream