System.SysUtils.TStringHelper.CopyTo

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

procedure CopyTo(SourceIndex: Integer; var destination: array of Char; DestinationIndex: Integer; Count: Integer);

Propriétés

Type Visibilité  Source Unité  Parent
procedure public System.SysUtils.pas System.SysUtils TStringHelper

Description

Copie la mémoire allouée pour quelques caractères de la chaîne de base zéro vers la mémoire allouée pour les caractères dans une autre chaîne de base zéro.

La fonction CopyTo est similaire à la fonction Move.

 var
   MyString, CopyString: String;
 
 begin
   MyString := 'This is a string.';
   CopyString := 'S';
   CopyString.CopyTo(0, MyString[11], 0, CopyString.Length);
   Writeln(MyString);
 end.

Sortie :

 This is a String.

Voir aussi