mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 12:26:58 +02:00
* added GuidCase function to intf/guid helper functions
git-svn-id: trunk@13234 -
This commit is contained in:
parent
9a9b05b683
commit
b5be9e008e
@ -33,4 +33,5 @@ function Supports(const AClass: TClass; const IID: Shortstring): Boolean; overlo
|
||||
function StringToGUID(const S: string): TGUID;
|
||||
function GUIDToString(const GUID: TGUID): string;
|
||||
function IsEqualGUID(const guid1, guid2: TGUID): Boolean;
|
||||
function GuidCase(const GUID: TGUID; const List: array of TGuid): Integer;
|
||||
|
||||
|
@ -145,6 +145,15 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function GuidCase(const GUID: TGUID; const List: array of TGuid): Integer;
|
||||
begin
|
||||
for Result := High(List) downto 0 do
|
||||
if IsEqualGUID(GUID, List[Result]) then
|
||||
Exit;
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
|
||||
function GUIDToString(const GUID: TGUID): string;
|
||||
begin
|
||||
SetLength(Result, 38);
|
||||
|
Loading…
Reference in New Issue
Block a user