모듈:글상자: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
1번째 줄: 1번째 줄:
local p = {}
local p = {}
local table_ =  { "a", "b", "c" }
function p.jsonDecode()
function p.jsonDecode()
return mw.text.jsonDecode(aa)
return mw.text.jsonDecode()
end
end
function p.jsonEncode()
function p.jsonEncode()
return mw.text.jsonEncode(aa)
return mw.text.jsonEncode(table_)
 
end
end



2021년 6월 6일 (일) 13:06 판

설명문서 [편집] [역사] [새로고침]

스크립트 오류: 함수 "main"가 존재하지 않습니다.

연습장이나 사용자 문서에서 틀의 사용이나 수정을 연습할 수 있습니다.
분류는 /설명문서에 넣어주세요.

local p = {}
local table_ =  { "a", "b", "c" }
function p.jsonDecode()
	return mw.text.jsonDecode()
end
function p.jsonEncode()
	return mw.text.jsonEncode(table_)

end

function p.textDecode(frame)
	return mw.text.decode(frame.args[1])
end
function p.textSplit(frame)
	return mw.text.split(frame.args[1], frame.args[2], frame.args[3] or "")
end

local vertical_p = {}

function vertical_p.main(frame)
	local str = ""
	local i, j = 1, 1
	
	while frame.args[i] do
		str = str..[[<div class="vertical_p" style="float:left;">]]..frame.args[i]..[[</div>]]
		i = i + 1
	end
	return str
end

--return vertical_p
return p