Home »
Documentation »
Filters »
length
Returns the length of the value.
The length of a list is the number of elements in the list, the length of a binary is the number of bytes in the binary.
For example:
{{ value|length }}When value is the list "hello" then the output will be “5”.
With multi-byte values this function does not return the number of characters, it returns the number of bytes. This may change in a future release.
This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.