From 77d954e58aeaa6224fd6930d596de4f96282f45e Mon Sep 17 00:00:00 2001 From: Max Cahill Date: Tue, 6 Jul 2021 08:29:13 +1000 Subject: [PATCH] stringx.split delimiter optional --- stringx.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/stringx.lua b/stringx.lua index f487521..40c37bf 100644 --- a/stringx.lua +++ b/stringx.lua @@ -12,6 +12,7 @@ local stringx = setmetatable({}, { --split a string on a delimiter into an ordered table function stringx.split(self, delim) + delim = delim or "" assert:type(self, "string", "stringx.split - self", 1) assert:type(delim, "string", "stringx.split - delim", 1)