void SetLength(int newLength);
Changes the length of the WideString.
SetLength changes the WideString’s length to newLength, truncating if necessary.
SetLength reallocates the underlying array of characters that stores the value of the WideString. Existing characters in the string are preserved, but the content of newly allocated space is undefined. If there is not enough memory available to reallocate theWideString, an EOutOfMemory exception is thrown. Following a call to SetLength, the WideString is guaranteed to reference a unique string, that is, a string with a reference count of one.