Changeset 286 for trunk/Packages/CevoComponents/StringTables.pas
- Timestamp:
- Feb 23, 2021, 10:47:47 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/StringTables.pas
r174 r286 19 19 function GetHandle(const Item: string): integer; 20 20 function LookupByHandle(Handle: integer; Index: integer = -1): string; 21 function Lookup(const Item: string; Index: integer = -1): string;21 function Lookup(const Item: string; Index: Integer = -1): string; 22 22 function Search(const Content: string; var Handle, Index: integer): boolean; 23 23 end; … … 99 99 end; 100 100 101 function TStringTable.Lookup(const Item: string; Index: integer): string;101 function TStringTable.Lookup(const Item: string; Index: Integer): string; 102 102 var 103 Handle: integer;103 Handle: Integer; 104 104 begin 105 105 Handle := GetHandle(Item); 106 106 if Handle >= 0 then 107 result := LookupByHandle(Handle, Index)107 Result := LookupByHandle(Handle, Index) 108 108 else 109 result := '';110 if result = '' then109 Result := ''; 110 if Result = '' then 111 111 if Index < 0 then 112 result := Format('[%s]', [Item])112 Result := Format('[%s]', [Item]) 113 113 else 114 result := Format('[%s %d]', [Item, Index])114 Result := Format('[%s %d]', [Item, Index]) 115 115 end; 116 116
Note:
See TracChangeset
for help on using the changeset viewer.