Internet Direct (Indy)
Home
PreviousUpNext
SplitColumns Function

Separates values specified in AData into columns.

Pascal
procedure SplitColumns(
    const AData: string; 
    AStrings: TIdStrings; 
    const ADelim: string = ' '
);
Parameters 
Description 
AData 
Values to be split into columns.
 
AStrings 
Storage for column values from the input data.
 
ADelim 
Delimiter used to seperate the column values. Default value is a space character (CHAR32). 

SplitColumns is a procedure used to separate values specified in AData into columns using the delimiter specified in ADelim. 

When omitted, the default value for ADelim is the Space character (CHAR32). 

AStrings is a TIdStrings instance used to store column values parsed from AData using the delimiter indicated in ADelim. AStrings is cleared prior to parsing column values from the input data in AData. 

Columns parsed from AData are trimmed prior to adding to AStrings using the AddObject method in TStringList. 

SplitColumns creates an associated TObject instance in AData that stored an Integer representing the offset of the column data in AData inclusing any leading whitespace or multiple occurrances of the delimiter specified in ADelim. 

It is the programmers responsibility to cast the Object instance to an Integer value when accessing the object reference. 

SplitColumns is used internally in the Indy library when TIdCommandHandler parses command parameters during TIdCommand execution. SplitColumns is also used in TIdFTP and descendant parsers to prepare the formatted FTP directory listing. 

Use SplitColumnsNoTrim to parse data into columns without trimming the resulting column values.

Exceptions 
Description 
EAssertionFailed 
raised when AStrings is unassigned. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.