Sign in Join
FPDoc Onlineexperiment

StringToStringList procedure

In unit LazStringUtils

Stores a multi-line string as separate lines in a TStrings instance.

Declaration

pascal
procedure StringToStringList(const s: string; List: TStrings)

Arguments

s

String with values extracted and stored in the string list.

List

TStrings instance where values are stored in the routine.

Description

StringToStringList is a procedure used to convert the multi-line String in S to separate lines of text in a TStrings instance.

The LF (#10) character is used to mark the end of a line in S, and causes the preceding text to be added to the string list in List. The LF character is not included in the value added to the string list.

If no end-of-line characters are found in S, then a single line of text is added to the string list.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.