Whatever message this page gives is out now! Go check it out!
ListChangeDelims(list, newDelimiter [, delimiters, includeEmptyFields ])Parameter | Description |
includeEmptyFields | Optional. Set to yes to include empty values. |
list | A list or a variable that contains one. |
newDelimiter | Delimiter string or a variable that contains one. Can be an empty string. ColdFusion processes the string as one delimiter. |
delimiters | A string or a variable that contains one. Characters that separate list elements. The default value is comma . If this parameter contains more than one character, ColdFusion processes each occurrence of each character as a delimiter. |
<cfscript>
myList="a,b,c,d,e";
myChangeDelims=ListChangeDelims(myList,"|"); //Replace comma in the list with pipe
WriteOutput(myChangeDelims & " ");
myAnotherList="a,b|c|d,e|f";
myCustomDelims=ListChangeDelims(myAnotherList,"@","|"); //Replace occurrence of "|" with "@"
WriteOutput(myCustomDelims);
</cfscript>