Not use SetLength at all it's a good idea, but the key question is "how"? I know that AnsiString is delimited by #0 (since is in fact a PAnsiChar) but that doesn't help me a lot here.
I can't use TList, in fact I am doing my component(s) as a replacement for T(String)List. So far are taking...
Well, I use many: SetItem, InsertItem, AppendItem, InsertItems, AppendItems, Insert/AppendMultipleItems (multiple items in different locations).
Here is SetItem:
procedure TShortStringArray.SetItem(const Idx: Integer; const Value: AnsiString);
var
i, d, Position, lv, lDiff, h: Integer...
My code will be free to be used in freeware applications.
But right now it's not finished and I want to release it only when it's finished.
I wanted to sent you the current version in a PM but couldn't find a way.
Hi.
I'm trying to make this function faster:
//Global variables
Positions: array of Integer;
ItemSize: array of Byte;
AllStrings: AnsiString;
FPosStep = 32;
FPosStepBinPwr = 5;
function TShortStringArray.GetItem(const Idx: Integer): AnsiString;
var
i, d, Position: Integer;
begin
if...
Hi.
I want to make my code work in any Delphi version.
For this I use compiler directives. But the compiler is still not happy 100%.
{$IF Defined(Ver80) or
Defined(Ver90) or
Defined(Ver100) or
Defined(Ver120) or
Defined(Ver130) or
Defined(Ver140) or
Defined(Ver150) or...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.