Inserts a string at the beginning and end of list elements.
listQualify(list, qualifier [, delimiters] [, elements] [, includeEmptyValues])
→ returns string
,
all
all
char
true
false
To insert a string or character before and after the list elements.
list = "coldfusion:railo:144:lucee:46";
writeOutput(listQualify(list, "|", ":"));
Expected Result: |coldfusion|:|railo|:|144|:|lucee|:|46|
To insert a string or character before and after the alphabet list elements only.
list = "coldfusion:railo:144:lucee:46";
writeOutput(listQualify(list, "|", ":","CHAR"));
Expected Result: |coldfusion|:|railo|:144:|lucee|:46
If includeEmptyFields is true, empty value add in list elements.
list = "coldfusion:railo:144::lucee::46";
writeOutput(listQualify(list, "|", ":","CHAR",true));
Expected Result: |coldfusion|:|railo|:144:||:|lucee|:||:46
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.