Inserts a string at the beginning and end of list elements.
listQualify(list, qualifier [, delimiters] [, elements] [, includeEmptyValues])
returns string
Name | Type | Required | Default | Description |
---|---|---|---|---|
list | string | Yes | A list or variable name | |
qualifier | string | Yes | A string or character in which to insert before and after the list elements | |
delimiters | string | No | , | Characters that separate list elements. The default value is comma. If this parameter contains more than one character, ColdFusion uses the first character as the delimiter and ignores the remaining characters. |
elements | string | No | all | all -all elements; char -elements that are composed of alphabetic characters |
includeEmptyFields | boolean | No | If includeEmptyFields is true, empty value add in list elements |
To insert a string or character before and after the list elements.
list = "coldfusion:railo:144:lucee:46";
writeOutput(listQualify(list, "|", ":"));
To insert a string or character before and after the alphabet list elements only.
list = "coldfusion:railo:144:lucee:46";
writeOutput(listQualify(list, "|", ":","CHAR"));
If includeEmptyFields is true, empty value add in list elements.
list = "coldfusion:railo:144::lucee::46";
writeOutput(listQualify(list, "|", ":","CHAR",true));