Skip to main content

split (Function)

Splits the input.string into substrings using the value parsed in the split.string and returns the substring at the position specified in the group.number.

Syntax

<STRING> str:split(<STRING> input.string, <STRING> split.string, <INT> group.number)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
input.stringThe input string to be replaced.STRINGNoYes
split.stringThe string value to be used to split the input.string.STRINGNoYes
group.numberThe index of the split groupINTNoYes

Example 1

split("gdn,ABM,NSFT", ",", 0)

This splits the given input.string by given split.string and returns the string in the index given by group.number. In this scenario, the output will is "gdn".