(Gast)
n/a Beiträge
|
AW: StrLCopy : Non VCL
28. Apr 2012, 01:23
Delphi-Quellcode:
function StrLCopy(Dest, Source: PChar; MaxLen: Cardinal): PChar;
var
Count: Cardinal;
begin
// copies a specified maximum number of characters from Source to Dest
Result := Dest;
Count := 0;
While (Count < MaxLen) and (Source^ <> #0) do begin
Dest^ := Source^;
Inc(Source);
Inc(Dest);
Inc(Count);
end;
Dest^ := #0;
end;
|
|
Zitat
|