Creates a new stringstream and sets its initial content.
Source position: classesh.inc line 1552
public constructor TStringStream.Create( |
const ABytes: TBytes |
); override; overload; |
const AString: AnsiString |
); overload; |
const AString: Ansistring; |
AEncoding: TEncoding; |
AOwnsEncoding: Boolean = True |
); overload; |
const AString: Ansistring; |
ACodePage: Integer |
); overload; |
const AString: UnicodeString |
); overload; |
const AString: UnicodeString; |
AEncoding: TEncoding; |
AOwnsEncoding: Boolean = True |
); overload; |
const AString: UnicodeString; |
ACodePage: Integer |
); overload; |
Create creates a new TStringStream instance and sets its initial content to Astring. The position is still 0 but the size of the stream will equal the length of the string.
The Encoding argument specifies the codepage with which the bytes in the string will be interpreted. If it is not specified (or Nil) the system default encoding will be used. The correct encoding can be detected from the string by using the TStringStream.CreateRaw constructor.
|
Contains the contents of the stream in string form. |
|
|
Datastring as unicode string. |
|
|
Encoding of the string with the data. |
|
|
Create stringstream using codepage of string. |