s:split

Convert a string into multiple variables.

INPUT
<s:split>
    x y z
</s:split>
<s:for each="split *" as="foo">
    <s:put> foo </s:put>,
</s:for>
OUTPUT
x, y, z,

By default, <split> uses (space) to split the string. To provide a different delimiter use the by attribute as shown below:

INPUT
<s:split by=",">
    blue, red, dark green
</s:split>
<s:for each="split *" as="color">
    color: <s:put> color </s:put> <s:newline />
</s:for>
OUTPUT
color: blue
color: red
color: dark green

You can also change the default <split> prefix.

INPUT
<s:split by="," prefix="separated colors">
    blue, red, dark green
</s:split>
<s:for each="separated colors *" as="color">
    color: <s:put> color </s:put> <s:newline />
</s:for>
OUTPUT
color: blue
color: red
color: dark green
☼ ☼ ☼ anotomy ☼ ☼ ☼
by=""  with=""  

The boundary string used to break the string into multiple variables. The default is (space).

prefix=""  

A prefix for the variables created by <split>. The default is split.