Changeset 17 for Common/UCommon.pas
- Timestamp:
- Mar 30, 2010, 11:25:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r2 r17 8 8 type 9 9 TArrayOfByte = array of Byte; 10 10 TArrayOfString = array of string; 11 11 12 function IntToBin(Data: Cardinal; Count: Byte): string; 12 13 function TryHexToInt(Data: string; var Value: Integer): Boolean; … … 99 100 end; 100 101 102 function Explode(Separator: char; Data: string): TArrayOfString; 103 begin 104 SetLength(Result, 0); 105 while Pos(Separator, Data) > 0 do begin 106 SetLength(Result, Length(Result) + 1); 107 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1); 108 Delete(Data, 1, Pos(Separator, Data)); 109 end; 110 SetLength(Result, Length(Result) + 1); 111 Result[High(Result)] := Data; 112 end; 101 113 102 114 end.
Note:
See TracChangeset
for help on using the changeset viewer.