System.Classes.TStrings.Append

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Append(const S: string);

C++

void __fastcall Append(const System::UnicodeString S);

Properties

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

Description

Adds a string to the list.

Append is the same as the Add method, except that it does not return a value. Use Append when there is no need to know the index of the string after it has been added, or with descendants of TStrings for which the index returned is not meaningful.

For example, the TStrings descendant used by memo objects uses an index to determine where to insert a string, but the inserted string does not necessarily end up as a single string in the list. Part of the inserted text may become part of the previous string, and part may be broken off into a subsequent string. The index returned by Add is not meaningful in this case.

Use Append rather than Add as a parameter for a function requiring a TGetStrProc.

See Also

Code Examples