JCL Help:StrToStrings@AnsiString@AnsiString@TJclAnsiStrings@Boolean

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Converts a string into a list of strings using the specified separator character.


Pascal

 procedure StrToStrings(S: string; Sep: string; const List: TStrings; const AllowEmptyString: Boolean = True);
procedure StrToStrings(S: AnsiString; Sep: AnsiString; const List: TJclAnsiStrings; const AllowEmptyString: Boolean = True);


Parameters

Parameters Description
S: string The string to split into elements.
Sep: string The string that separates the individual elements.
const List: TStrings A TStrings derivative that receives the individual elements.


Description

StrToStrings converts the supplied string, which supposedly is a list of strings packed into a single string variable, to a TStrings. The function uses the supplied separator string to separate the string into its individual elements.
For example, if you call the function like this: StrToStrings('Project JEDI Rules', ' ', List) then on return list will contain three items, namely 'Project', 'JEDI', and 'Rules'. As this example shows, the last string doesn't have to be terminated by the separator string although it is allowed.


See Also

StringsToStr


About

Unit

JclAnsiStrings


Donator

Anthony Steele


Notes

The list will be cleared by this function before adding the elements.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page