split(string, string [, result] )

With two parameters, the split function breaks up a string based on a delimiter defined by the second string and returns a table containing all of the resulting tokens. When the three parameter form is used the split function returns a scalar value which is the Nth value found in the string by tokenizing the string.

Examples

t = split( "one;two;three;four", ";" )
three = split("one;two;three;four", ";", 3 )