length

Returns the length of the text or list value.
Accepts
Returns
Syntax
length(value) value.length()

Using length on a string will return the number of letters, numbers, symbols, and whitespace characters.

"Ben Something!".length()
=
14 14

Lists will return the number of items in the list.

[1, 2, 3].length()
=
3 3

Note that using length on an empty value — like "".length() — will return 0, while a list of empty values will still return the number of items.

["", "", ""].length()
=
3 3

Numbers will be formatted as strings before their length is calculated.

1234567890.length()
=
10 10

Dates, on the other hand, are seen as a single object, so will always return 1 when length is applied directly.

today().length()
=
1 1