what's a nice, fast way to sort a list of GUIDs (as TGuid). i thought i'd just use SysUtils.CompareMem(P1, P2: Pointer; Length: Integer): Boolean; until i realized it returns boolean.
i'd wish for something comparable to CompareText( ) or CompareValue( ) that return integer so it can be used in a sort comparison.
i suppose not many people wish to sort GUIDs...any ideas?
i suppose i could call make some cascading calls to CompareValue( ) on the contents of the TGuid record. my instincts tell me there must be a better way!
thank you!
If you're using Delphi 2009 or better, you can use TComparer<TGUID>.Compare()
, or the BinaryCompare
function it calls, from the Generics.Defaults unit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With