ListToarray()

Converts the list into an array, optionally including the empty elements

Usage

ARRAY = ListToarray( list, delimiter, flag )
Argument Summary
list list
delimiter delimiter - default comma (,) [optional]
flag empty flag - indicates whether blank elements should be included in the list. Defaults to false [optional]

Calling

Supports named-parameter calling allowing you to use the function like:

ListToarray(
   list=?, 
   delimiter=?, 
   flag=?
);

Supports passing parameters as a structure using ArgumentCollection:

ListToarray( ArgumentCollection={
   list : ?, 
   delimiter : ?, 
   flag : ?
} );

Extra

Take a list element and convert it to an array based on delimiter

<cfscript>
// Store the Query_String string from the CGI scope to a variable named page
// For this page - cgi.QUERY_STRING = "function/listtoarray"
var page = cgi.QUERY_STRING;

// now turn the query string into an Array using / as our delimter
var qs = listToArray( pageName, "/" );

// We now have an array named qs with two elements in
writeOutput( request.params[1] ); // would output "function"
writeOutput( request.params[2] ); // would output "listtoarray"

</cfscript>