diff --git a/processor/processor.go b/processor/processor.go index a2fdb56..86185c0 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -314,6 +314,18 @@ function upper(s) return string.upper(s) end function lower(s) return string.lower(s) end function format(s, ...) return string.format(s, ...) end +-- String split helper +function strsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t = {} + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + table.insert(t, str) + end + return t +end + -- String to number conversion helper function num(str) return tonumber(str) or 0