Module:Format eq stat

From RuneSaga Wiki
Revision as of 22:14, 22 February 2024 by Admin (talk | contribs) (Created page with "local p = {} function p.signed(arg) local first_char = string.sub(arg, 1, 1) if first_char == '+' or first_char == '-' then return arg else return '+'..arg end end function p.main(frame) local args = frame:getParent().args local arg = args[1] or '' return p.signed(arg) end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Format eq stat/doc

local p = {}

function p.signed(arg)
	local first_char = string.sub(arg, 1, 1)

	if first_char == '+' or first_char == '-' then
		return arg
	else
		return '+'..arg
	end
end

function p.main(frame)
	local args = frame:getParent().args

	local arg = args[1] or ''
	return p.signed(arg)
end

return p