[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

strecopy

Copy a null-terminated string, return a pointer to the end.

Declaration

Source position: syspchh.inc line 21

function strecopy(

  dest: PChar;

  source: PChar

):PChar;

function strecopy(

  dest: PWideChar;

  source: PWideChar

):PWideChar;

Description

Copies the Null-terminated string in Source to Dest, and returns a pointer to the end (i.e. the terminating Null-character) of the copied string.

Errors

No length checking is performed.

See also

StrLCopy

  

Copy a null-terminated string, limited in length.

StrCopy

  

Copy a null-terminated string

Example

Program Example6;

Uses strings;

{ Program to demonstrate the StrECopy function. }

Const P : PChar = 'This is a PCHAR string.';

Var PP : PChar;

begin
  PP:=StrAlloc (StrLen(P)+1);
  If Longint(StrECopy(PP,P))-Longint(PP)<>StrLen(P) then
    Writeln('Something is wrong here !')
  else
    Writeln ('PP= ',PP);
  StrDispose(PP);  
end.

Documentation generated on: Sep 28 2017