next up previous contents index
Next: StrLen Up: Functions and procedures. Previous: StrLComp

StrLCopy

   

Declaration:

Function StrLCopy (Dest,Source : PChar; MaxLen : Longint) : PChar;

Description:

Copies MaxLen characters from Source to Dest, and makes Dest a null terminated string.

Errors:

No length checking is performed.

See also:

StrCopy, StrECopy

Example
Program Example5;

Uses strings;

{ Program to demonstrate the StrLCopy function. }

Const P : PCHar = '123456789ABCDEF';

var PP : PCHar;

begin
  PP:=StrAlloc(11);
  Writeln ('First 10 characters of P : ',StrLCopy (PP,P,10));
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998