delphi - comparing a GUID so I can sort by GUID -
What's a cool, fast way to sort a list of GUIDs (as TGuid) I thought I just SysUtils.CompareMem (P1, P2: indicator, length: integer) I use: boolean; Until I did not realize that she returned boolean.
I would like to compare it to comparable comparisons () or comparison val () which returns the integer, then it can be used in some way.
i suppose many people do not want to sort GUIDs ... any ideas?
I think I can make some cascading calls compared to the content of Tigude record (). My tendency tells me that there should be a better way!
Thank you!
If you are using Delphi 2009 or better, you can use the TComparer & lt; TGUID & gt; You can use. The Comparison ()
, or BinaryCompare
function, calls it from Generics. Defaults Unit
Comments
Post a Comment