SysUtils.StrLCopy
From RAD Studio VCL Reference
Contents |
Delphi Information
From SysUtils.pas
function StrLCopy(Dest: PAnsiChar; const Source: PAnsiChar; MaxLen: Cardinal): PAnsiChar; overload; function StrLCopy(Dest: PWideChar; const Source: PWideChar; MaxLen: Cardinal): PWideChar; overload;
Unit: SysUtils
Type: function
Visibility: public
C++ Information
From SysUtils.hpp
char * __fastcall StrLCopy(char * Dest, const char * Source, unsigned int MaxLen);
Unit: SysUtils
Type: function
Description
Copies up to a specified maximum number of characters from Source to Dest.
StrLCopy copies a maximum MaxLen characters from Source to Dest, then adds a null terminator to Dest and returns Dest. The SizeOf standard function (Delphi) or the sizeof operator (C++) can be used to determine the MaxLen parameter. Usually, MaxLen equals SizeOf(Dest)-1.
Note: StrLCopy copies a null terminator as well as MaxLen characters. Be sure that Dest is large enough to accommodate the null terminator at the end.
See Also
Code Samples