[Lazarus] not optimal code (need Move) in RegExpr unit
Alexey
aaa5500 at ya.ru
Mon Sep 11 20:29:12 CEST 2017
function StrPCopy (Dest: PRegExprChar; const Source: RegExprString):
PRegExprChar;
var
i, Len : PtrInt;
begin
Len := length (Source); //###0.932
for i := 1 to Len do
Dest [i - 1] := Source [i];
Dest [Len] := #0;
Result := Dest;
end; { of function StrPCopy
--------------------------------------------------------------}
function StrLCopy (Dest, Source: PRegExprChar; MaxLen: PtrUInt):
PRegExprChar;
var i: PtrInt;
begin
for i := 0 to MaxLen - 1 do
Dest [i] := Source [i];
Result := Dest;
end; { of function StrLCopy
--------------------------------------------------------------}
--
Regards,
Alexey
More information about the Lazarus
mailing list