Home »
Code Examples »
Lua Code Examples
Lua - Example of Split string Code Example
The code for Example of Split string
function mysplit (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
Code by IncludeHelp,
on January 2, 2023 20:35
Reference:
stackoverflow