Removes duplicate values (if they exist) in a list.

listRemoveDuplicates(list[, delimiter] [, ignoreCase]) → returns string

listRemoveDuplicates Argument Reference

list string

Required. List of objects.

delimiter string
Default: ,

Optional. Character(s) that separate list elements. The default value is comma.

ignoreCase boolean
Default: false

Optional. If true, ignores the case of strings in the list. By default the value is set to false.



Version 10+ ColdFusion 10: Added this function

Examples sample code invoking the listRemoveDuplicates function

Basic usage (case sensitive)

Basic usage. Optional arguments left as defaults.


Expected Result: one,two,three,four,five

Optional arguments usage (ignore case = true)

Optional arguments being set. Ignore case set to true

listRemoveDuplicates("one,two,three,four,five,ONE,TWO,THREE", ",", true)

Expected Result: one,two,three,four,five

Fork me on GitHub