local t = parts[1]:trim()
local r = tonumber(parts[2]:trim())
local c = tonumber(parts[3]:trim())
- if type(r) == "number" and type(c) == "number" and t ~= "INV" then
+ if type(r) == "number" and type(c) == "number"
+ and t ~= "INV" then
return {type=t, row=r, column=c}
end
end
local arg = {n=select('#', ...), ...}
if arg.n >= 1 then
-- Insert positional parameters ($1, $2, ...)
- result = ''
- pos = 1
+ local result = ''
+ local pos = 1
while pos <= text:len() do
- newpos = text:find('[$]', pos)
+ local newpos = text:find('[$]', pos)
if newpos == nil then
result = result .. text:sub(pos)
pos = text:len() + 1
else
- paramindex = tonumber(text:sub(newpos+1, newpos+1))
- result = result .. text:sub(pos, newpos-1) .. tostring(arg[paramindex])
+ local paramindex =
+ tonumber(text:sub(newpos+1, newpos+1))
+ result = result .. text:sub(pos, newpos-1)
+ .. tostring(arg[paramindex])
pos = newpos + 2
end
end