StringBuilder

actual typealias StringBuilder = StringBuilder (source)

Platform and version requirements: Kotlin 1.1, JVM

actual class StringBuilder : Appendable, CharSequence (source)

Platform and version requirements: JS

Constructors

<init>

StringBuilder(capacity: Int)
StringBuilder(content: CharSequence)
StringBuilder()
StringBuilder(content: String = "")

Properties

length

actual val length: Int

Returns the length of this character sequence.

Functions

append

actual fun append(c: Char): StringBuilder
actual fun append(csq: CharSequence?): StringBuilder
actual fun append(
    csq: CharSequence?,
    start: Int,
    end: Int
): StringBuilder
actual fun append(obj: Any?): StringBuilder

get

actual fun get(index: Int): Char

Returns the character at the specified index in this character sequence.

reverse

actual fun reverse(): StringBuilder

subSequence

actual fun subSequence(
    startIndex: Int,
    endIndex: Int
): CharSequence

Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.

toString

fun toString(): String

Returns a string representation of the object.