Changes a list delimiter. Returns a copy of the list, with each delimiter character replaced by new_delimiter.
listChangeDelims(list, new_delimiter [, delimiters, [includeEmptyValues]])
returns string
list.listChangeDelims(new_delimiter [, delimiters, [includeEmptyValues]])
Name | Type | Required | Default | Description |
---|---|---|---|---|
list | string | Yes | A list or a variable that contains one. | |
new_delimiter | string | Yes | Delimiter string or a variable that contains one. Can be an empty string. ColdFusion processes the string as one delimiter. | |
delimiters | string | No | , | 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. |
includeEmptyValues | string | No | NO | CF10+ Set to yes to include empty values. |
Changes the delimiters in the list
listChangeDelims("foo,bar,lorem,ipsum", "|")
Changes the delimiters in the list using a custom delimiter
listChangeDelims("foo,bar|lorem,ipsum|me|something", "~", "|")