Returns a list of the values that appear more than once in a list. Each repeated value is returned once, in the order of its first repeat.
listGetDuplicates(list [, delimiter [, ignoreCase [, includeEmptyFields]]])
→ returns string
,;, only splits on ;,; Lucee treats each character as a delimiter. The result is joined with the full delimiter string.
falsefalseReturns each value that appears more than once.
listGetDuplicates("1,2,2,5,5,1,3")
Expected Result: 2,5,1
With ignoreCase true, one and ONE count as duplicates.
listGetDuplicates("one,two,ONE,three,THREE", ",", true)
Expected Result: ONE,THREE
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.