Table of Contents
Filter: length
:
- no args
The length
filter returns the number of items of a sequence or mapping, or the length of a string.
{% if users|length > 10 %}
...
{% endif %}
length
behavior:
- string: count of bytes (this is not count of symbols)
- table with
__len
meta function: result oftable:__len()
- table with
__pairs
meta function: count of elementstable:__pairs()
- table: count of elements
- other: always
0