Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (14 sloc) 0.525 kb

Returns the first character or element.

Returns the first byte of a binary or the first element of a list. An empty binary is returned when the input is empty.

For example:

{{ value|first }}

When the value is hello then the output is h.

Note: This function is not safe to use with multibyte character values, use with care.

For a regular list:

{{ [1,2,3]|first }}

The filtered value is 1.

Jump to Line
Something went wrong with that request. Please try again.