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 à plusieurs caractères de la chaîne dans la mémoire allouée aux caractères d'une autre chaîne.

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