WriteText (NotesStream - LotusScript®)

Writes text to a stream.

Defined in

NotesStream

Syntax

bytes& = notesStream .WriteText( text$ , [ eol& ] )

Parameters

text$

String. The text to write, to a maximum of 2GB bytes.

eol&

Constant of type Long. End-of-line character(s) appended to the text. The default is EOL_NONE.

  • EOL_CR (2) appends a carriage return (ASCII 13).
  • EOL_CRLF (0) appends a carriage return and line feed (ASCII 10 + 13).
  • EOL_LF (1) appends a line feed (ASCII 10).
  • EOL_NONE (5) appends nothing. Default.
  • EOL_PLATFORM (3) follows the conventions of the current platform.

Return value

bytes&

Long. The number of characters written.

Usage

This method appends the text to the end of the stream.

This method raises an error if the stream is read-only. See IsReadOnly.

When a stream is written, property values are:

  • Bytes is incremented by the number of bytes read
  • IsEOS is True
  • Position is set at end of stream

If the stream is opened on an empty file and the character set is Unicode, UTF-16, UTF-16BE, or UTF-16LE, this method writes byte order mark or signature bytes at the beginning of the stream. These bytes are transparent upon subsequent accesses of the stream with the same character set.

Example