method reallocate
Documentation for method reallocate
assembled from the following types:
role Buf
From Buf
(Buf) method reallocate
method reallocate()
Change the number of elements of the Buf
. The Buf
will be made larger if the specified value is larger than the current number of elements. The value of newly created elements is undetermined and should thus not be relied upon. It returns the altered Buf
.
my Buf .= new(^10);.reallocate(5);say .perl; # OUTPUT: «Buf.new(0,1,2,3,4)»