Move a string from one place in the list to another.
Source position: classesh.inc line 1039
public procedure TStrings.Move( |
CurIndex: Integer; |
NewIndex: Integer |
); virtual; |
Move moves the string at position CurIndex so it has position NewIndex after the move operation. The object associated to the string is also moved. CurIndex and NewIndex should be in the range of 0 to Count-1.
Remark: | NewIndex is not the position in the stringlist before the move operation starts. The move operation
This may not lead to the desired result if NewIndex is bigger than CurIndex. Consider the following example: With MyStrings do begin Clear; Add('String 0'); Add('String 1'); Add('String 2'); Add('String 3'); Add('String 4'); Move(1,3); end; After the Move operation has completed, 'String 1' will be between 'String 3' and 'String 4'. |
If either CurIndex or NewIndex is outside the allowed range, an EStringListError is raised.
|
Exchanges two strings in the list. |