Introduce StringBuilder.clear() extension

#KT-18910 Fixed
This commit is contained in:
Ilya Gorbunov
2018-06-14 03:47:16 +03:00
parent c667340261
commit bbee18b84d
6 changed files with 58 additions and 0 deletions
@@ -129,6 +129,15 @@ public expect fun String.decapitalize(): String
public expect fun CharSequence.repeat(n: Int): String
/**
* Clears the content of this string builder making it empty.
*
* @sample samples.text.Strings.clearStringBuilder
*/
@SinceKotlin("1.3")
public expect fun StringBuilder.clear(): StringBuilder
/**
* Returns a new string with all occurrences of [oldChar] replaced with [newChar].
*/