Delete Procedure

Applies to TestComplete 15.47, last modified on January 20, 2023

The Delete procedure removes a substring from a string.

Declaration

Delete(StrIndexCount) Parameters
Str [in, out] Required String
Index [in] Required Integer
Count [in] Required Integer
Result     None  

Description

Deletes a substring of the Str string from the position specified in the Index parameter (starting from 1). The length of the deleted substring is specified in the Count parameter.

Parameters

The procedure has the following parameters:

Str

Specifies the source string and stores the resulting string.

Index

Specifies the number of the character from which the deletion starts. If Index is larger than the length of the string or less than 1, no characters are deleted.

Count

Specifies the length of the removed substring. If Count specifies more characters than Str contains (starting from Index), the procedure removes the rest of the string. If Count is less than or equals 0, no characters are deleted.

See Also

DelphiScript - List of Supported Routines and Variables
Copy
Insert
Length
Pos

Highlight search results