help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Procedures and functions] Reference for unit 'strings' (#rtl)

strlcopy

Copy a null-terminated string, limited in length.

Declaration

Source position: strings.pp line 31

function strlcopy(

  dest: pchar;

  source: pchar;

  maxlen: SizeInt

):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

  

Copy a null-terminated string

StrECopy

  

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

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));
  StrDispose(PP);
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505