mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 16:31:43 -04:00
Replace mail.split by builtin func
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
This commit is contained in:
parent
a2930517da
commit
03191fa406
1 changed files with 0 additions and 15 deletions
15
api.lua
15
api.lua
|
@ -112,18 +112,3 @@ function mail.send(...)
|
||||||
end
|
end
|
||||||
end
|
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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue