W3cubDocs

/Kotlin

Appendable

Platform and version requirements: JS (1.1), Native (1.3)
interface Appendable
Platform and version requirements: JVM (1.1)
typealias Appendable = Appendable

An object to which char sequences and values can be appended.

Functions

Platform and version requirements: JS (1.0), Native (1.0)

append

Appends the specified character value to this Appendable and returns this instance.

abstract fun append(value: Char): Appendable

Appends the specified character sequence value to this Appendable and returns this instance.

abstract fun append(value: CharSequence?): Appendable

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

abstract fun append(
    value: CharSequence?, 
    startIndex: Int, 
    endIndex: Int
): Appendable

Extension Functions

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

append

Appends all arguments to the given Appendable.

fun <T : Appendable> T.append(vararg value: CharSequence?): T
Platform and version requirements: JVM (1.4), JS (1.4), Native (1.4)

appendLine

Appends a line feed character (\n) to this Appendable.

fun Appendable.appendLine(): Appendable

Appends value to the given Appendable and a line feed character (\n) after it.

fun Appendable.appendLine(value: CharSequence?): Appendable
fun Appendable.appendLine(value: Char): Appendable
Platform and version requirements: JVM (1.4), JS (1.4), Native (1.4)

appendRange

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

fun <T : Appendable> T.appendRange(
    value: CharSequence, 
    startIndex: Int, 
    endIndex: Int
): T

Inheritors

StringBuilder

A mutable sequence of characters.

Platform and version requirements: JS (1.1)
class StringBuilder : Appendable, CharSequence
Platform and version requirements: JVM (1.1)
typealias StringBuilder = StringBuilder
Platform and version requirements: Native (1.3)
class StringBuilder : CharSequence, Appendable

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-appendable/index.html