TSubstringListLinguistic.Resize Method

procedure Resize(const NewCapacity: Integer);

Sets Capacity to NewCapacity, any size, rounded up to a multiple of 128 and at least 128, keeping the items that fit; setting Capacity keeps none.

#NameDescription
1NewCapacity

The number of items to hold afterwards, 0 or more.

Result: stored in self (calling object)

Remarks:

Below Count the items from NewCapacity on are deleted, as Substring.Resize cuts a text; every item kept keeps its index and its text, and an item that reads an item's characters still reads them. Growing moves no item; shrinking moves as few as possible, as Compact does. An item that reads characters no item holds any more - a deleted item's - is left as it is and dangles, as after Delete. Below 0 it raises EStringListError.