string.listItemTrim()

Removes all the white space surrounding each element, returning back the new list

string.listItemTrim( delimiters=string, includeEmptyFields=boolean )

Returns: String

Argument Description
delimiters
string, optional

Characters that separate list elements. The default value is comma.

Alias: delimiter

includeEmptyFields
boolean, optional

if set to true, empty values are included as well

Examples

strList=",,,,I,,love,,,,,lucee,,";
writeDump(strList.listItemTrim());

See also