Module:Sourcrowd: Difference between revisions

From TestWiki
Content added Content deleted
(update)
(rollback to old version)
 
(21 intermediate revisions by the same user not shown)
Line 9: Line 9:
local p = {}
local p = {}


local bn_num = { false }
function p.main( frame )
local i = nil
if type(p[frame.args[1]]) == 'function' then
bn_num[1] = { 0x9e7, 0x9e8, 0x9e9, 0x9ea, 0x9eb, 0x9ec, 0x9ed, 0x9ee, 0x9ef, 0x9e6 }
return p[frame.args[1]](frame.args[2], frame.args[3])
for i=1, 10 do
else
bn_num[2][i] = mw.ustring.char( bn_num[1][i] )
return p[frame.args[1]][frame.args[2] or false]
end
end
end


function p.a2b( str )
function p.a2b( frame )
return
return
end
end


function p.b2a( str, ctype )
function p.b2a( frame )
local str = frame.args[1] or ''
if ctype then
if ( frame.args[2] or false ) then
retValue = '['
retValue = '['
else
else
retValue = '\05B'
retValue = mw.ustring.gsub( str, '1', bn_num[2][i] )
end
end



Latest revision as of 16:01, 14 March 2017

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

--[[  

This module is intended as test environment of user:Sourcrowd.

PLEASE DO NOT MODIFY!

]]

local p = {}

local bn_num = { false }
local i = nil
bn_num[1] = { 0x9e7, 0x9e8, 0x9e9, 0x9ea, 0x9eb, 0x9ec, 0x9ed, 0x9ee, 0x9ef, 0x9e6 }
for i=1, 10 do
     bn_num[2][i] = mw.ustring.char( bn_num[1][i] )
end

function p.a2b( frame )
	return
end

function p.b2a( frame )
	local str = frame.args[1] or ''
	if ( frame.args[2] or false ) then
		retValue = '['
	else
		retValue = mw.ustring.gsub( str, '1', bn_num[2][i] )
	end

	return retValue
end
return p