Awee

first

First returns the first character of a string or the first element of a slice.

First returns the first character of a string or the first element of a slice.

Input

string array

Parameters

None

Returns

string, any

Examples

Pick the first item from a list

Input

items = ["espresso", "latte", "macchiato"]

Template

{{ items | first }}

Output

espresso

Take the first letter of a name

Input

name = "Alice"

Template

{{ name | first }}

Output

A

How is this guide?

On this page