IIOStreamClass.WriteString

Syntax

WriteString(Stream: IIOStream; Value: String);

Parameters

Stream. Stream, into which data is written.

Value. String that must be written into a stream.

Description

The WriteString method writes a string in Unicode encoding into a stream.

Example

In the example the stream is represented by the file C:\Stream.txt.

Sub UserProc;
Var
    f: IFile;
    BinW: IBinaryWriter;
Begin
    f := New File.Create As IFIle;
    BinW := f.OpenBinaryWriter("C:\Stream.txt"True);
    IOStream.WriteString(Binw.Stream, "Write string to file via stream");
End Sub UserProc;

After executing the example the specified string is written into a stream.

See also:

IIOStreamClass