Recent

Author Topic: String comparing [Split from: Operator prededence with @ and []]  (Read 169 times)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 866
  • Fifty shades of code.
    • Delphi & FreePascal
Re: String comparing [Split from: Operator prededence with @ and []]
« Reply #15 on: November 28, 2022, 03:41:33 pm »
On Windows/Delphi I do sort most often AlphaNumerical like this:
Code: Pascal  [Select][+][-]
  1. function SortProc(List: TStringList; Index1, Index2: Integer): Integer;
  2. begin
  3.   Result := CompareString(LOCALE_USER_DEFAULT, SORT_STRINGSORT or SORT_DIGITSASNUMBERS, PChar(List[Index1]), Length(List[Index1]), PChar(List[Index2), Length(List[Index2)) - CSTR_EQUAL;
  4. end;
But never tried with Lazarus.
(above to sort a ListView)
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

 

TinyPortal © 2005-2018