Changeset 30 for trunk/Packages/Common/Common.pas
- Timestamp:
- Jun 28, 2024, 11:08:43 PM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Common.pas
r29 r30 1 unit UCommon;1 unit Common; 2 2 3 3 interface … … 65 65 function GetFileFilterItemExt(Filter: string; Index: Integer): string; 66 66 function IntToBin(Data: Int64; Count: Byte): string; 67 function Implode(Separator: Char; List: TList<string>): string; 67 function Implode(Separator: string; List: TList<string>): string; 68 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 68 69 function LastPos(const SubStr: String; const S: String): Integer; 69 70 function LoadFileToStr(const FileName: TFileName): AnsiString; … … 206 207 end;*) 207 208 209 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 210 var 211 I: Integer; 212 begin 213 Result := ''; 214 for I := 0 to List.Count - 1 do begin 215 Result := Result + Around + List[I] + Around; 216 if I < List.Count - 1 then Result := Result + Separator; 217 end; 218 end; 219 208 220 function LastPos(const SubStr: String; const S: String): Integer; 209 221 begin … … 314 326 end; 315 327 316 function Implode(Separator: Char; List: TList<string>): string;328 function Implode(Separator: string; List: TList<string>): string; 317 329 var 318 330 I: Integer;
Note:
See TracChangeset
for help on using the changeset viewer.