Function Split
Splits content and returns a single element or multiple elements with formatting.
Split([VALUE],[SPLITTER],[INDEX],[DELIMITER],[FORMAT],[INCLUDE_EMPTY])
Parameters
# | Type | Passing | Default | Name | Description/Comments |
---|---|---|---|---|---|
1 | string | required | n/a | VALUE | The value to check |
2 | string | optional | space | SPLITTER | The value to split on |
3 | number | optional | null | INDEX | The index of the element to return starting at 1 or null for formatting instead |
4 | string | optional | null | DELIMITER | The delimiter to use if not using the index |
5 | string | optional | null | FORMAT | The c# format to use if not using the index |
6 | boolean | optional | false | INCLUDE_EMPTY | Whether 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_"