1. Home
  2. Liquid
  3. Size
#liquid#string#array#filter

Count the number of characters in a string or length of an array. "." or "|" syntax can be used.

 {{ arrayOfItems.size  }}
 {% comment  %} or  {% endcomment  %}
// or
 {{  "How many characters?" | size }}
 {% comment  %} This will return 20  {% endcomment  %}
copy
Full Liquid cheatsheet
Sitemap Git repository