WoW API: strsplit
Jump to navigation
Jump to search
Splits a string using a delimiter
s1, s2, s3 ... sn = strsplit("delimiter", "subject")
Arguments
- (delimiter, subject)
- delimiter
- String - Delimiter
- subejct
- String - String to split
Returns
A list of strings. Not a table.
Example
local a, b, c = strsplit(",", "a b c")
Result
a = "a" b = "b" c = "c"
Details
To get a table use:
local tbl = { strsplit(delimiter, subject) }