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

編集の要約なし
( (トーク) による版 6536 を取り消し)
タグ: 取り消し
編集の要約なし
2行目: 2行目:
function p.hundred(frame)
function p.hundred(frame)
a,b,m,n,o = {},{},{},{},{}
a,b,m,n,o = {},{},{},{},{}
if frame.args[3] then
if frame.args[2] then
s = tonumber(frame.args[3]) or 100
s = tonumber(frame.args[3]) or 100
if string.find(frame.args[1],frame.args[2]) then
if string.find(frame.args[1],frame.args[2]) then
26行目: 26行目:
end
end
else
else
        if frame.args[2] then
m[1] = frame.args[1]
            if string.find(frame.args[1],frame.args[2]) then
         return string.rep(m[1],100)
                a[1],b[1] = string.find(frame.args[1],frame.args[2])
                m[1] = string.char(string.byte(frame.args[1],a[1],b[1]))
                n[1] = a[1] == 1 and "" or string.char(string.byte(frame.args[1],1,a[1]-1))
                o[1] = b[1] == #frame.args[1] and "" or string.char(string.byte(frame.args[1],b[1]+1,#frame.args[1]))
                return n[1]..string.rep(m[1],100)..o[1]
            else
            m[1] = frame.args[1]
            return string.rep(m[1],100)
            end
         else
        m[1] = frame.args[1]
        return string.rep(m[1],100)
        end
     end
     end
end
end
return p
return p
3,292

回編集