TStrings.Exchange

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

Swaps the positions of two specified strings.

Declaration

TStringsObj.Exchange(Index1Index2) Parameters
TStringsObj     A TStrings object  
Index1 [in] Required Integer
Index2 [in] Required Integer
Result     none  

Description

The Exchange method swaps positions of two strings in the list. This method moves the string at position Index1 to position Index2, and vice versa.

Parameters

The method has the following parameters:

Index1 , Index2

Specify the indices of the desired strings in the list. The indices are zero-based: the first string in the list has index 0, the second - 1, and so on. Index of the last string is Count - 1.

See Also

TStrings.Insert
TStrings.Move

Highlight search results