WriteString()

Syntax

WriteString(#File, Text$ [, Flags])
Description
Write a string in the #File. The file must be opened using a write-capable function (i.e. not with ReadFile()). Without any 'Flags', the string is written in UTF8 format if the program is compiled in unicode mode, else it's written in ASCII format.

The optional 'Flags' parameter may be one of the following values:
  #PB_Ascii  : Writes the string in ASCII format, even when the program is compiled in unicode mode
  #PB_UTF8   : Writes the string in UTF8 format, even when the program is compiled in ASCII mode
  #PB_Unicode: Writes the string in UTF16 format (the program may be either in unicode or ASCII mode).
For an example see the CreateFile() function.

For placing a BOM (byte order mark) to later identify the string encoding format of a file there is the WriteStringFormat() function available.

Supported OS

All

<- WriteQuad() - File Index - WriteStringFormat() ->