Function Split

Function Split

Splits content and returns a single element or multiple elements with formatting.

Split([VALUE],[SPLITTER],[INDEX],[DELIMITER],[FORMAT],[INCLUDE_EMPTY])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringrequiredn/aVALUEThe value to check
2stringoptionalspaceSPLITTERThe value to split on
3numberoptionalnullINDEXThe index of the element to return starting at 1 or null for formatting instead
4stringoptionalnullDELIMITERThe delimiter to use if not using the index
5stringoptionalnullFORMATThe c# format to use if not using the index
6booleanoptionalfalseINCLUDE_EMPTYWhether to include empty values if not using the index

Returns

The element if using an index or a formatted list if not using the index


Examples

Example of splitting if using an index

{{Split("A B C D E F"," ",3)}}

Will result in "C"


Example of splitting if not using an index

{{Split("A B C D E F"," ",null,"~", "_{0}_")}}

Will result in "_A_~_B_~_C_~_D_~_E_~_F_"