Indy 9
SplitLines
Unit: IdStrings
Separates character values in into individual lines in a TStrings object instance.
procedure SplitLines(AData: PChar; ADataSize: Integer; AStrings: TStrings);
Unit
IdStrings
Parameters
AData: PChar
Buffer to be examine for lines of text.
ADataSize: Integer
Number of characters to be examined in the buffer.
AStrings: TStrings
TSrings instance to be loaded with lines from AData.
Description
SplitLines is a procedure used to separate the character values in AData into individual lines in AStrings. AData is the buffer to be examined for CR or LF markers that indicate the end of a line. AData will examine up to and including ADataSize characters in the AData buffer. When a CR, LF, or CRLF sequence is encountered, the string and a Pointer to the beginning of the current line are stored in AStrings using the TStrings.AddObject method.

Note: AStrings calls the TStrings.BeginUpdate and TString.Clear methods propr to locating and adding lines to the TStrings object instance. AStrings calls the TStrings.EndUpdate method when ADataSize characters have been handled in the Data buffer.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.