System.SysUtils.TStringHelper.CopyTo

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

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

プロパティ

種類 可視性 ソース ユニット
procedure public System.SysUtils.pas System.SysUtils TStringHelper


説明

文字列内の複数の文字のために確保されたメモリを、別の文字列の文字のために確保されたメモリへコピーします。

CopyTo 関数は、Move 関数と同等です。

var
  MyString, CopyString: String;

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

出力:

This is a String.

関連項目