listToArray

Creates an array containing items from a delimited string.

Syntax

listToArray(textList, delimeters, arrayName)

Parameters

textList

Specifies a string containing items separated by any of the delimeters specified in the delimeters parameter.

delimeters

Specifies a string in which each character is a delimeter that can serve to separate the elements specified in the textList parameter.

arrayName

Specifies the name of the array that will be created.

Returns

Returns an empty string.

Remarks

Each item in textList will be created as a variable whose name begins with the name specified by arrayName, followed by a period, followed by a the index for that item. A final variable containing the number of items in the list will be created by using arrayName, followed by .count.

For example,

 {VAR listToArray("one, two three;four,;seven", ", ;", "Numbers")}

will generate an array called Numbers that has the following values:

Numbers[1]=one
Numbers[2]=two
Numbers[3]=three
Numbers[4]=four
Numbers[5]=seven
Numbers.count=5

For more information about using arrays, see Arrays.