SetLength procedure sets a new length for the specified string.
Sets a new length for the Str string. Actually, the procedure creates a new string object, fills it with the contents of the old string and assigns it to Str.
The procedure has the following parameters:
Specifies the source string.
Specifies the new length of the string.
If NewLength is smaller than the length of the specified string (see
Length), the extra characters are lost.