StringBuilder: EnsureCapacity

EnsureCapacity

Ensures that the internal buffer has atleast the requested amount.



 Public Function EnsureCapacity(
	  ByVal RequiredCapacity As Long ) As Long

Parameters

RequiredCapacity
[ByVal] Long. The minimum amount of characters to be allocated.

Return Values

Long -  The capacity after the call is complete.

Remarks

When RequiredCapacity is larger than the current capacity, The new capacity is calculated as double the current capacity. If the new capacity is still smaller than RequiredCapacity, RequiredCapacity becomes the new capacity.

See Also

Project CorLib Overview

Class StringBuilder Overview