Function writeAsEPString

Writes a string to file in standard Extended Pascal string format.

void writeAsEPString (
  string str,
  ushort capacity,
  std.stdio.File file
);

This format consists of the string contents, truncated or padded with '\0' upto capacity, followed by two bytes (ushort) stating the length of the padding.

Parameters

NameDescription
str The string to write.
capacity The length of the written data section. If the length of str exceeds capacity then trunctation will happen. The written string is padded with '\0' upto capacity.
file The file to write to.

Throws

Exception (only in debug mode) if str.length > capacity.

See Also

readEPString, writeAsEPShortString.