[Stdlib] Fix K/N StringBuilder insertRange capacity issue
This commit is contained in:
@@ -611,6 +611,7 @@ actual class StringBuilder private constructor (
|
||||
checkBoundsIndexes(startIndex, endIndex, value.size)
|
||||
|
||||
val extraLength = endIndex - startIndex
|
||||
ensureExtraCapacity(extraLength)
|
||||
array.copyInto(array, startIndex = index, endIndex = _length, destinationOffset = index + extraLength)
|
||||
value.copyInto(array, startIndex = startIndex, endIndex = endIndex, destinationOffset = index)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user