Topic Path: Symbol Reference > Functions > ReadStringFromStream Function
ReadStringFromStream Function

Reads a string value from a stream implementation.

function ReadStringFromStream(
    AStream: TIdStream; 
    ASize: Integer = -1
): string;
Source of values for the read operation.
Number of bytes in the stream to be read. Default value is -1. 

String - Value read from the stream.

ReadStringFromStream is a String function used to read a String value from a Stream. ReadStringFromStream isolates the differences between platform- or operating system-specific stream implementations required to perform the operation. 

AStream is the stream used as the source of values for the read operation. 

ASize is the size of the stream used as input for the read operation. 

The return value for the function is a string containing the values read from the stream, or an empty string when ASize contains 0 (zero). 

Use ReadBytesArrayFromStream to read an array of Byte values from a stream implementation. 

Use ReadStringFromStream to read a string data type from a stream implementation.



Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.