ensureCapacity

fun ensureCapacity(minimumCapacity: Int)(source)

Grows the buffer when minimumCapacity exceeds the current capacity.

Existing text and length are preserved. Requests at or below the current capacity, including negative requests, do nothing. The resulting capacity may exceed the request.

Parameters

minimumCapacity

desired buffer size in UTF-16 code units.