resize

fun resize(newLength: Int)(source)

Changes the length of a resizable buffer to newLength bytes. Bytes past the old end read as zero, and every view sees the new length at once.