সমললৈ যাওক

Module:ConvertDigit(As2En)

অসমীয়া ৱিকিপিডিয়াৰ পৰা
18:41, 23 February 2019-ত দিব্য দত্ত (আলোচনা | বৰঙণি) সদস্য‌ই কৰা সংশোধন (নতুন পৃষ্ঠা: -- Return input text after converting any en digits and month names. local as_digits = { ['০'] = '0', ['১'] = '1', ['২'] = '2', ['৩'] = '3', ['৪']...)

Documentation for this module may be created at Module:ConvertDigit(As2En)/doc

-- Return input text after converting any en digits and month names.

local as_digits = {
	['০'] = '0',
	['১'] = '1',
	['২'] = '2',
	['৩'] = '3',
	['৪'] = '4',
	['৫'] = '5',
	['৬'] = '6',
	['৭'] = '7',
	['৮'] = '8',
	['৯'] = '9',
}

local function _main(input)
	-- Callable from another module.
	input = input or ''
	return (input:gsub('%d', as_digits))
end

local function main(frame)
	-- Callable from #invoke or from a template.
	return _main(frame.args[1] or frame:getParent().args[1])
end

return { main = main, _main = _main }