IStringList.AsString

Syntax

AsString: String;

Description

The AsString property determines an array as a text string using separator - {Line feed}.

Comments

When the AsString property is set, the array will be generated by splitting the specified string using separator {Line feed}. Elements placed in the array before it will be removed.

When the AsString property is obtained, the string will be generated by merging array elements. The separator {Carriage return} + {Line feed} will be inserted between elements.

Example

Sub UserProc;
Var
    StrL: IStringList;
Begin
    StrL := New StringList.Create;
    StrL.AsString := "One" + #13 + #10 + "Two" + #13 + #10 + "Three" + #13 + #10 + "Four";
End Sub UserProc;

After executing the example four elements from text string are added to the StrL array.

See also:

IStringList