clear
Clears the content of this string builder making it empty and returns this instance.
Since Kotlin
1.3
Samples
import samples.*
import java.util.Locale
import kotlin.test.*
fun main() {
//sampleStart
val builder = StringBuilder()
builder.append("content").append(1)
assertPrints(builder, "content1")
builder.clear()
assertPrints(builder, "")
//sampleEnd
}