W3cubDocs

/Kotlin

<init>

Platform and version requirements: JS (1.0), Native (1.0)
<init>()

Constructs an empty string builder.

Platform and version requirements: JS (1.0), Native (1.0)
<init>(capacity: Int)
For Common, Native

Constructs an empty string builder with the specified initial capacity.

For JS

Constructs an empty string builder with the specified initial capacity.

In Kotlin/JS implementation of StringBuilder the initial capacity has no effect on the further performance of operations.

Platform and version requirements: JS (1.0), Native (1.0)
<init>(content: CharSequence)

Constructs a string builder that contains the same characters as the specified content char sequence.

Platform and version requirements: JS (1.0), Native (1.0)
<init>(content: String)
For Common, Native

Constructs a string builder that contains the same characters as the specified content string.

For JS

A mutable sequence of characters.

String builder can be used to efficiently perform multiple string manipulation operations.

© 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/-string-builder/-init-.html