Fluid icon indicating copy to clipboard operation
Fluid copied to clipboard

[FEATURE] JoinViewHelper

Open benjaminkott opened this issue 3 months ago • 1 comments

The JoinViewHelper combines elements from an array into a single string. You can specify both a general separator and a special one for the last element that is rendered between the elements.

Examples

Simple join

<f:join value="{0: '1', 1: '2', 2: '3'}" />   

Results in the output:

123

Join with separator

<f:join value="{0: '1', 1: '2', 2: '3'}" separator=", " />

Results in the output:

1, 2, 3

Join with separator, and special one for the last

<f:join value="{0: '1', 1: '2', 2: '3'}" separator=", " separatorLast=" and " />

Results in the output:

1, 2 and 3

benjaminkott avatar Mar 14 '24 14:03 benjaminkott