AsString: String;
The AsString property determines an array as a text string using separator - {Line feed}.
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.
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: