UnicodeString str = "example string"; str.SetLength(7); //Resizes the string to 7 characters
UnicodeString str = "hello"; str.SetLength(10, '!'); //Resizes string to 10 characters and fills the added space with '!' //"hello" becomes "hello!!!!"Package Library: The `SetLength` method is a part of the `UnicodeString` class which is included in the `System.SysUtils` package library in C++.