I am using Velocity Templating Language and currently have:
#set ( $stringList = $string.split(\",\") )
which works fine and splits the str
Its also possible to push elements into an array like this.
#set ($matchingProducts = []) #set($bar = $matchingProducts.add($p))