[fpc-pascal] Byte array manipulation

Wimpie Nortje wimpienortje at gmail.com
Mon Aug 17 09:57:14 CEST 2009


Andrew Brunner wrote:
> Hi there,
>
> I have a ByteArray unit that's pretty extensive.
>
> function toString(Var Item:TByteArray):string
> var
>   iLen:Integer;
> begin
>   iLen:=System.Length(Item);
>   SetLength(Result,iLen);
>   if iLen>0 then
>     System.Move(Item[0],Result[1],iLen);
> end;
Thanks, this will be a useful function.





More information about the fpc-pascal mailing list