Changeset 17


Ignore:
Timestamp:
Mar 30, 2010, 11:25:23 AM (14 years ago)
Author:
george
Message:
  • Přidáno: Třída TIPAddress pro práci s adresami IPv4.
  • Přidáno: Třída TVarIntSerializer pro práci s VarInt kódováním.
  • Přidáno: Funkce Explode v knihovně Common.
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • Common/UCommon.pas

    r2 r17  
    88type
    99  TArrayOfByte = array of Byte;
    10 
     10  TArrayOfString = array of string;
     11 
    1112function IntToBin(Data: Cardinal; Count: Byte): string;
    1213function TryHexToInt(Data: string; var Value: Integer): Boolean;
     
    99100end;
    100101
     102function Explode(Separator: char; Data: string): TArrayOfString;
     103begin
     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;
     112end;
    101113
    102114end.
Note: See TracChangeset for help on using the changeset viewer.