[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LResources' (#lcl)

TLRSObjectWriter.WriteString

Writes a string value using the format for the LRS object writer.

Declaration

Source position: lresources.pp line 300

public procedure TLRSObjectWriter.WriteString(

  const Value: TLazObjectWriterString

); override;

Arguments

Value

  

String value stored in the method.

Description

WriteString is an overridden method in TLazObjectWriter used to store the specified string value to the storage format used in the writer class.

WriteString uses the length of the specified string in Value to determine the actions needed in the method. If the value can be represented using the ShortString type (255 characters or less), WriteValue is called to write a single Byte value with the length for the vaString type. For longer string values, an Integer value is written using the Endian-ness for the platform. The Write method is called to store the string content when the length is a positive non-zero value.

WriteString implements the abstract virtual method defined in TAbstractObjectWriter.

Version info

Modified in LCL version 3.0 to use the TLazObjectWriterString type instead of the String type in the Value argument.

See also

TAbstractObjectWriter


Version 4.0 Generated 2025-05-03 Home