Trims every item in the list and returns a new list.
listItemTrim(list [, delimiters] [, includeEmptyFields])
→ returns string
list.listItemTrim([delimiters] [, includeEmptyFields])
,
false
Trims each item in the list.
exampleList = "hello, world ,this, is a, ,example";
writeOutput(listItemTrim(examplelist));
Expected Result: hello,world,this,is a,,example
Trims each item in the list.
exampleList = "hello, world ,this, is a, ,example";
exampleList = exampleList.listItemTrim();
writeOutput(examplelist);
Expected Result: hello,world,this,is a,,example
Trims each item in the list and keep empty items.
exampleList = "hello, world ,this, is a, ,,example";
writeOutput(listItemTrim(examplelist, ",", true));
Expected Result: hello,world,this,is a,,,example
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.