mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 22:24:35 +00:00
stringx.split delimiter optional
This commit is contained in:
parent
65d06d01f6
commit
77d954e58a
@ -12,6 +12,7 @@ local stringx = setmetatable({}, {
|
|||||||
|
|
||||||
--split a string on a delimiter into an ordered table
|
--split a string on a delimiter into an ordered table
|
||||||
function stringx.split(self, delim)
|
function stringx.split(self, delim)
|
||||||
|
delim = delim or ""
|
||||||
assert:type(self, "string", "stringx.split - self", 1)
|
assert:type(self, "string", "stringx.split - self", 1)
|
||||||
assert:type(delim, "string", "stringx.split - delim", 1)
|
assert:type(delim, "string", "stringx.split - delim", 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user