Module:Weapon Calculation: Difference between revisions

From HorizonXI Wiki
No edit summary
No edit summary
Line 2: Line 2:


local function parseInput ( input )
local function parseInput ( input )
if ( input.tonumber() ) then return input end
if ( type(input) == 'number' ) then return input end
local number = string.match(input, "%d+")
local number = string.match(input, "%d+")

Revision as of 10:36, 2 July 2025

Documentation for this module may be created at Module:Weapon Calculation/doc

local p = {}    

local function parseInput ( input )
	if ( type(input) == 'number' ) then return input end
	
	local number = string.match(input, "%d+")
	local finalstring = input:gsub(number, '')
	return number, finalstring 
end 

function p.test (frame)
	local parsed = parseInput(frame)
	return type()
end

return p