local t = {}
local c = 1
+ if #str == 0 then
+ return {""}
+ end
+
if #pat == 0 then
return nil
end
end
-- Removes whitespace from beginning and end of a string
-function trim (string)
- return string:gsub("^%s*(.-)%s*$", "%1")
+function trim(string)
+ local s = string:gsub("^%s*(.-)%s*$", "%1")
+ return s
end
-- Updates given table with new values