Ignore:
Timestamp:
Jan 14, 2022, 10:34:53 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Use latest stable Lazarus 2.2.0 for build.
  • Modified: Updated Common package to version 0.9.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UCommon.pas

    r116 r122  
    8585function TryHexToInt(Data: string; var Value: Integer): Boolean;
    8686function TryBinToInt(Data: string; var Value: Integer): Boolean;
     87procedure SortStrings(Strings: TStrings);
    8788
    8889
     
    677678end;
    678679
     680procedure SortStrings(Strings: TStrings);
     681var
     682  Tmp: TStringList;
     683begin
     684  Strings.BeginUpdate;
     685  try
     686    if Strings is TStringList then begin
     687      TStringList(Strings).Sort;
     688    end else begin
     689      Tmp := TStringList.Create;
     690      try
     691        Tmp.Assign(Strings);
     692        Tmp.Sort;
     693        Strings.Assign(Tmp);
     694      finally
     695        Tmp.Free;
     696      end;
     697    end;
     698  finally
     699    Strings.EndUpdate;
     700  end;
     701end;
     702
    679703
    680704initialization
Note: See TracChangeset for help on using the changeset viewer.