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

ナビゲーションに移動 検索に移動
編集の要約なし
編集の要約なし
編集の要約なし
1行目: 1行目:
function hundred(frame)
function hundred(frame)
     if frame[2] == true then
     if frame.args[2] == true then
         if string.find(frame[1],frame[2]) == true then
         if string.find(frame.args[1],frame.args[2]) == true then
             a,b = string.find(frame[1],frame[2])
             a,b = string.find(frame.args[1],frame.args[2])
             m = string.char(string.byte(frame[1],a,b))
             m = string.char(string.byte(frame.args[1],a,b))
             if a == 1 then
             if a == 1 then
                 n =""
                 n =""
             else  
             else  
                 n = string.char(string.byte(frame[1],1,a-1))
                 n = string.char(string.byte(frame.args[1],1,a-1))
             end
             end
             if b == #frame[1] then
             if b == #frame.args[1] then
                 o=""
                 o=""
             else
             else
                 o = string.char(string.byte(frame[1],b+1,#frame[1]-1))
                 o = string.char(string.byte(frame.args[1],b+1,#frame.args[1]-1))
             end
             end
             return n..m..o
             return n..m..o
        else
        m = frame.args[1]
        return m
         end
         end
    else
    m = frame.args[1]
        return m
     end
     end
end
end
3,298

回編集

案内メニュー