System.Classes.TWriter.WriteString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure WriteString(const Value: string);

C++

void __fastcall WriteString(const System::UnicodeString Value);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TWriter

Description

Writes the string passed in Value to the writer object's stream.

WriteString is used internally by the component streaming system to write string type properties of components to the writer object's stream.

WriteString calls WriteValue to write the value-type indicator (one of the vaString, vaLString, vaWString, or vaUTF8String values) proper to the passed Value string and then calls Write to write the passed Value string data to the writer object's stream.

WriteString advances the current position after the last written byte.

Warning: Always use WriteString for writing component strings to streams. The similarly-named WriteStr and WriteUTF8Str methods are for internal use by certain components and can corrupt data if not used correctly.

See Also