ADD: TStringHashListUtf8.Remove method

This commit is contained in:
Alexander Koblov 2023-12-30 16:35:46 +03:00
commit 20a161d513

View file

@ -60,6 +60,7 @@ type
function Add(const S: String): Integer;
function Add(const S: String; ItemData: Pointer): Integer;
procedure Clear;
procedure Remove(Index: Integer);
function Find(const S: String): Integer;
function Find(const S: String; Data: Pointer): Integer;
function Remove(const S: String): Integer;
@ -162,6 +163,15 @@ begin
fCount:= 0;
end;
procedure TStringHashListUtf8.Remove(Index: Integer);
begin
if (Index >= 0) and (Index < FCount) then
begin
Dispose(fList[Index]);
Delete(Index);
end;
end;
function TStringHashListUtf8.CompareString(const Low, Key: String): Boolean;
var
P: Pointer;