Replace mail.split by builtin func

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
This commit is contained in:
Athozus 2023-03-11 14:17:58 +01:00
parent a2930517da
commit 03191fa406
No known key found for this signature in database
GPG key ID: B50895022E8484BF

15
api.lua
View file

@ -112,18 +112,3 @@ function mail.send(...)
end
end
end
function mail.split(str, delimiter) -- flux split function
local rv = {}
local i, j = str:find(delimiter, nil, true)
while i do
table.insert(rv, str:sub(1, i - 1))
str = str:sub(j + 1)
i, j = str:find(delimiter, nil, true)
end
table.insert(rv, str)
return rv
end