split

Top  Previous  Next

Definition

results = string.split ( str, pattern, resultsTable )

 

Name

Type

Description

results

table of strings

A table of strings

pattern

string

Pattern upon which to split can be regexp

resultsTable

table (optional)

A table to hold the result, will be passed back as results

 

table.print( string.split("hello world there", " ") )

 

This will print

 

{ -- #0

   [1] = "hello",

   [2] = "world",

   [3] = "there",

} -- #0