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

説明

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

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.

関連項目