System.SysUtils.TStringHelper.CopyTo
Delphi
procedure CopyTo(SourceIndex: Integer; var destination: array of Char; DestinationIndex: Integer; Count: Integer);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
Description
Copies memory allocated for several characters in the 0-based string to the memory allocated for characters in another 0-based string.
CopyTo function is similar to Move function.
var
MyString, CopyString: String;
begin
MyString := 'This is a string.';
CopyString := 'S';
CopyString.CopyTo(0, MyString[11], 0, CopyString.Length);
Writeln(MyString);
end.
Output:
This is a String.