Splits a string into a table, matching on specific delimiters.
Usage
string.split(my_string,delimiters)
Arguments
Name
Type
Description
my_string
string
String to split.
delimiters
string
String whose individual characteres are used as delimiters.
Returns
Name
Type
Description
split_result
table
List of components after the split.
Examples
localsentence="Welcome to my shop, adventurer!";localwords=sentence:split(" ,!");for_,wordinipairs(words)do-- Sequentially prints "welcome", "to", "my", "shop" and "adventurer"print(word);end