unit StrECopy;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: StrECopy
// Routine: SysUtils.StrECopy

// BeginCode
{
This example uses a button on a form.  Since StrECopy returns
the destination char array, nested calls are possible and
actually more efficient than repeated calls.  StrECopy does
no bounds checking. When the button is clicked, the inline
text is appended to a static buffer. Then the buffer is
displayed in the form's canvas.
}

procedure TForm1.Button1Click(Sender: TObject);
const
  Turbo: PChar = 'Object';
  Pascal: PChar = 'Pascal';
 var
  S: array[0..15] of Char;
begin
  SysUtils.StrECopy(SysUtils.StrECopy(SysUtils.StrECopy(S, Turbo), ' '), Pascal);
  Canvas.TextOut(10, 10, string(S));
end;
// EndCode
// EndExample: StrECopy
end.
