「モジュール:テスト」の版間の差分

提供:WikiWiki
ナビゲーションに移動 検索に移動
編集の要約なし
編集の要約なし
1行目: 1行目:
local p = {}
local p = {}
function p.test(frame)
if frame.args[2] then
return frame.args[2]
else
return "失敗."
end
end
function p.hundred(frame)
function p.hundred(frame)
     if frame.args[2] == true then
     if frame.args[2] then
         if string.find(frame.args[1],frame.args[2]) == true then
         if string.find(frame.args[1],frame.args[2]) == true then
             local a,b = string.find(frame.args[1],frame.args[2])
             local a,b = string.find(frame.args[1],frame.args[2])

2年1月12日 (来) 00:26時点における版

このモジュールについての説明文ページを モジュール:テスト/doc に作成できます

local p = {}
function p.hundred(frame)
    if frame.args[2] then
        if string.find(frame.args[1],frame.args[2]) == true then
            local a,b = string.find(frame.args[1],frame.args[2])
            local m = string.char(string.byte(frame.args[1],a,b))
            if a == 1 then
                local n =""
            else 
                local n = string.char(string.byte(frame.args[1],1,a-1))
            end
            if b == #frame.args[1] then
                local o=""
            else
                local o = string.char(string.byte(frame.args[1],b+1,#frame.args[1]-1))
            end
            return n..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..o
        else
        	local m = frame.args[1]
        	return m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m
        end
    else
    	local m = frame.args[1]
        	return m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m..m
    end
end
return p