JCL Help:StrIToStrings@string@string@TStrings@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 StrIToStrings(S: string; Sep: string; const List: TStrings; 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.
const AllowEmptyString: Boolean = True Specifies whether empty strings can be added to the list or not.


Description

StrIToStrings 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: StrIToStrings('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

StrToStrings


About

Unit

JclStrings


Donator

Anthony Steele


Notes

The function differs from StrToString since it does not perform any case conversion of the string passed as the parameter. 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