Skip to content

split

Splits a string into an array.

string | split: separator

array

Liquid
{% assign sizes = 'S,M,L' | split: ',' %}{{ sizes | size }} sizes, first {{ sizes | first }}
Output
3 sizes, first S

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?