cfdocs

listFirst

Gets the first element of a list.

listFirst(list [, delimiters])
returns string

Argument Reference

Name Type Required Default Description
list string Yes    
delimiters string No ,  

Simple listFirst Example

A very basic listFirst example

listFirst("one,two,three,four");

Expected Result: one

Traversing a List with listFirst and listRest

Nesting list functions lets you move through the list in pieces.

listFirst(listRest(listRest("one,two,three,four")));

Expected Result: three