Skip to main content Link Search Menu Expand Document (external link) Copy Copied

ReadText

Reads a number of characters from the stream file and saves the result to the current instance.


Syntax

expression.ReadText

Parameters

None

Return value

None

📝Note

Before read data, user must open a stream to the target text file.

See also
OpenStream Method.

Behavior

Each call to the ReadText method will read a set of characters until the buffer size is reached. If the EndStreamOnLineBreak property is set to True, the stream will cut off at the first occurrence of a line break (CRLF, CR or LF) in the reverse left direction (from right to left) or add some extra data until a line break character in the forward direction is encountered. The ReadText method will continue reading data until the pointer exceeds the length of the current streamed text file.

📝Note

If the streams need to end on line breaks, the buffer size must to be set to be enough to hold a couple of lines of the file.

See also :BufferSize Property, EndStreamOnLineBreak Property.

Back to Methods overview