Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------
- function ParseArguments(s)
- if type(s) ~= "string" then
- return nil
- end
- local args = string.split(cmdline)
- for index,arg in ipairs(arg) do
- if string.startswith(arg, "\"") and string.endswith(arg, "\"") then
- args[index] = string.sub(arg, 2, -2)
- elseif tonumber(arg) ~= nil then
- args[index] = tonumber(arg)
- end
- end
- return args
- end
Add Comment
Please, Sign In to add comment