listCompact

Remove empty elements from start and end of the list

listCompact(list [, delimiters] [, multiCharacterDelimiter]) → returns string

Member Function Syntax

list.listCompact([delimiters] [, multiCharacterDelimiter])

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

list string
Required

delimiters string
Default: ,

multiCharacterDelimiter boolean
Default: false

Examples
Sample code invoking the listCompact function

listCompact(",eggs,milk,bread,flour,")

Expected Result: eggs,milk,bread,flour

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub