Ignore:
Timestamp:
Jun 5, 2023, 6:44:57 PM (18 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Updated Common package.
File:
1 moved

Legend:

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

    r144 r145  
    1 unit UCommon;
     1unit Common;
    22
    33interface
     
    77  {$IFDEF UNIX}baseunix,{$ENDIF}
    88  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics,
    9   FileUtil; //, ShFolder, ShellAPI;
     9  FileUtil, Generics.Collections; //, ShFolder, ShellAPI;
    1010
    1111type
     
    3131  ExceptionHandler: TExceptionEvent;
    3232  DLLHandle1: HModule;
    33 {$IFDEF WINDOWS}
    34   GetUserNameEx: procedure (NameFormat: DWORD;
    35     lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
    36 {$ENDIF}
     33
     34  {$IFDEF WINDOWS}
     35    GetUserNameEx: procedure (NameFormat: DWORD;
     36      lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
     37  {$ENDIF}
    3738
    3839const
     
    6465function GetFileFilterItemExt(Filter: string; Index: Integer): string;
    6566function IntToBin(Data: Int64; Count: Byte): string;
     67function Implode(Separator: Char; List: TList<string>): string;
    6668function LastPos(const SubStr: String; const S: String): Integer;
    6769function LoadFileToStr(const FileName: TFileName): AnsiString;
     
    312314end;
    313315
     316function Implode(Separator: Char; List: TList<string>): string;
     317var
     318  I: Integer;
     319begin
     320  Result := '';
     321  for I := 0 to List.Count - 1 do begin
     322    Result := Result + List[I];
     323    if I < List.Count - 1 then Result := Result + Separator;
     324  end;
     325end;
     326
    314327{$IFDEF WINDOWS}
    315328function GetUserName: string;
Note: See TracChangeset for help on using the changeset viewer.