Whatever message this page gives is out now! Go check it out!

ListChangeDelims

Last update:
May 18, 2026

Description

Changes a list delimiter.

Returns

A copy of the list, with each delimiter character replaced by newDelimiter.
History
ColdFusion (2018 release): Made the following changes:
  • Parameter name includeEmptyValues renamed to includeEmptyFields.
  • Parameter name new_delimiter renamed to newDelimiter .

Category

Function syntax
ListChangeDelims(list, newDelimiter [, delimiters, includeEmptyFields ])

See also

ListFirstListQualify; Lists in the Developing ColdFusion Applications

Parameters

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.

Example

<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>
Output
a|b|c|d|e a,b@c@d,e@f

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page