Introduce StringBuilder.clear() extension
#KT-18910 Fixed
This commit is contained in:
@@ -14,6 +14,13 @@ package kotlin.text
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun StringBuilder.set(index: Int, value: Char): Unit = this.setCharAt(index, value)
|
||||
|
||||
/**
|
||||
* Clears the content of this string builder making it empty.
|
||||
*
|
||||
* @sample samples.text.Strings.clearStringBuilder
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public actual fun StringBuilder.clear(): StringBuilder = apply { setLength(0) }
|
||||
|
||||
private object SystemProperties {
|
||||
/** Line separator for current system. */
|
||||
|
||||
Reference in New Issue
Block a user