Skip to content

TStringReader.Create

Create a new instance of TStreamReader from a string.

Declaration

Source position: streamex.pp line 143

public 
constructor Create(const AString: AnsiString; ABufferSize: Integer)
                  ;  virtual;

constructor Create(const AString: AnsiString);  virtual;

Description

Create initializes a TStringReader instance using the provided AString. It will allocate a buffer of ABufferSize bytes for faster reading of data. If no buffer size is specified, BUFFER_SIZE will be used. If the ABufferSize argument is less than MIN_BUFFER_SIZE, then MIN_BUFFER_SIZE bytes will be used.

Errors

If AStream is Nil, an #rtl.sysutils.EArgumentException exception will be raised.

See also

Name Description
TStreamReader.Destroy Destroy the TStreamReader instance.
TStream