StreamToString function
|
![]() ![]() ![]() |
acUtils
|
function StreamToString(Stream: TStream): String;
|
The StreamToString function converts the content of the stream to a string. It determines the size of future string by stream size and put full content of stream to a string.
|
function StreamToString(Stream: TStream): String;
|
var
|
Len: DWord;
|
begin
|
with Stream do
|
begin
|
Len := Size - Position;
|
SetLength(Result, Len);
|
Read(Result[1], Len);
|
end;
|
end;
|
PutStringToStream and GetStringFromStream routines.
|