2

Get an array of every character in a string, is it available?

My code attempting to do (but failed):

{% assign a = "ABC" | split "" %}
{{ a | join ',' }}
a_a
  • 37
  • 4

1 Answers1

1

Your attempt is correct, is just the syntax that is not correct.

{% assign a = "ABC" | split: "" %}

{{ a | join: ',' }}
Fabio Filippi
  • 1,732
  • 25
  • 40