SetLength Procedure

Applies to TestComplete 15.46, last modified on January 09, 2023

The SetLength procedure sets a new length for the specified string.

Declaration

SetLength(StrNewLength) Parameters
Str [in] Required String
NewLength [in] Required Integer
Result     String  

Description

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.

Parameters

The procedure has the following parameters:

Str

Specifies the source string.

NewLength

Specifies the new length of the string.

Remarks

If NewLength is smaller than the length of the specified string (see Length), the extra characters are lost.

See Also

DelphiScript - List of Supported Routines and Variables
Length

Highlight search results