Topic Path: Symbol Reference > Functions > CopyTIdString Function
ContentsIndexHome
PreviousUpNext
CopyTIdString Function

Copy all or part of a string data type into the specified array bytes.

File
procedure CopyTIdString(
    const ASource: String; 
    var VDest: TIdBytes; 
    const ADestIndex: Integer; 
    ALength: Integer = -1
);
Parameters 
Description 
ASource 
string data type with values to be copied in the operation.
 
VDest 
Storage for values copied from ASource.
 
ADestIndex 
zero-based offset that identifies the initial position where copied values will be stored.
 
ALength 
number of bytes from ASource to be copied into the array of bytes in VDest. The default value is -1. 

CopyTIdString is a procedure used to copy all or part of a string data type into the specified array bytes 

ASource is the string data type with values to be copied in the operation. 

VDest is the TIdBytes where the values copied from ASource will be stored. 

ADestIndex is the zero-based offset that identifies the initial position in VDest where values copied from ASource will be stored. 

ALength indicates the number of bytes from ASource to be copied into the array of bytes in VDest. The default value is -1 and indicates that all byte values in ASource should be included in the copy operation. 

 

For the .Net platform, CopyTIdString calls ToBytes to access an array of bytes that represent the values in ASource. The Copy method in the FCL System.Array class is used to peform the copy operation with the specified index and byte count. 

 

For all other platform where the Borland RTL is natively supported, the Move procedure in SysUtils.pas is called to peform the copy operation with the specified index and byte count.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.