Postpone introducing common StringBuilder.capacity() function

Its support complicates JS StringBuilder implementation with no actual
performance improvements. Benefits of having capacity() function
in common code are also not completely clear.

Relates to KT-33069
#KT-40168
This commit is contained in:
Ilya Gorbunov
2020-07-09 20:35:46 +03:00
parent 097e0fb46c
commit 20683d62a6
5 changed files with 17 additions and 21 deletions
@@ -90,8 +90,9 @@ expect class StringBuilder : Appendable, CharSequence {
*
* The capacity is the maximum length this string builder can have before an allocation occurs.
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
@SinceKotlin("1.3")
// @ExperimentalStdlibApi
@Deprecated("Obtaining StringBuilder capacity is not supported in JS and common code.", level = DeprecationLevel.ERROR)
fun capacity(): Int
/**