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:
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user