モジュール:テスト

提供:WikiWiki
2年1月9日 (ゐ) 23:02時点における (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

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

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