Gets the last element of a list.
listLast(list [, delimiters, includeEmptyValues ])
returns string
Name | Type | Required | Default | Description | Values | |
---|---|---|---|---|---|---|
list | string | Yes | A list or a variable that contains a list. | |||
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; you cannot specify a multicharacter delimiter. | ||
includeEmptyValues | boolean | No | Set to true to include empty values. | /Users/garethedwards/development/github/cfdocs/docs/functions/listlast.md | false |
A very basic listLast example
listLast("one,two,three,four");
A more advanced listLast example
listLast("one/two\three/four", "\/");